website refactor
This commit is contained in:
@@ -32,6 +32,7 @@ export interface CardProps {
|
||||
group?: boolean | any;
|
||||
w?: string | any;
|
||||
justifyContent?: string | any;
|
||||
fullHeight?: boolean | any;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,6 +66,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(({
|
||||
gap,
|
||||
py,
|
||||
backgroundColor,
|
||||
fullHeight,
|
||||
}, ref) => {
|
||||
const variantClasses = {
|
||||
default: 'bg-[var(--ui-color-bg-surface)] border-[var(--ui-color-border-default)] shadow-sm',
|
||||
@@ -112,6 +114,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(({
|
||||
...(alignItems ? { alignItems } : {}),
|
||||
...(gap !== undefined ? { gap: `${gap * 0.25}rem` } : {}),
|
||||
...(border === false ? { border: 'none' } : {}),
|
||||
...(fullHeight ? { height: '100%' } : {}),
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -129,7 +132,7 @@ export const Card = forwardRef<HTMLDivElement, CardProps>(({
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className={typeof padding === 'number' || p !== undefined ? '' : getPaddingClass(padding)}>
|
||||
<div className={`${typeof padding === 'number' || p !== undefined ? '' : getPaddingClass(padding)} ${fullHeight ? 'h-full flex flex-col' : ''}`}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user