diff --git a/webui/src/common/components/Card/Card.jsx b/webui/src/common/components/Card/Card.jsx new file mode 100644 index 0000000..fdb4b17 --- /dev/null +++ b/webui/src/common/components/Card/Card.jsx @@ -0,0 +1,43 @@ +import React from 'react'; +import './styles.sass'; + +export const Card = ({ + children, + className = '', + hover = false, + padding = 'md', + variant = 'default', + ...rest +}) => { + const cardClasses = [ + 'card', + `card--${variant}`, + `card--padding-${padding}`, + hover && 'card--hover', + className + ].filter(Boolean).join(' '); + + return ( +
+ {children} +
+ ); +}; + +export const CardHeader = ({ children, className = '' }) => ( +
+ {children} +
+); + +export const CardBody = ({ children, className = '' }) => ( +
+ {children} +
+); + +export const CardFooter = ({ children, className = '' }) => ( +
+ {children} +
+); \ No newline at end of file diff --git a/webui/src/common/components/Card/index.js b/webui/src/common/components/Card/index.js new file mode 100644 index 0000000..d7a5d56 --- /dev/null +++ b/webui/src/common/components/Card/index.js @@ -0,0 +1 @@ +export { Card as default, CardHeader, CardBody, CardFooter } from './Card.jsx'; \ No newline at end of file diff --git a/webui/src/common/components/Card/styles.sass b/webui/src/common/components/Card/styles.sass new file mode 100644 index 0000000..6570f7e --- /dev/null +++ b/webui/src/common/components/Card/styles.sass @@ -0,0 +1,43 @@ +.card + background: var(--bg-alt) + border: 1px solid var(--border) + border-radius: var(--radius-lg) + transition: all 0.2s ease + + &--hover:hover + border-color: var(--border-strong) + transform: translateY(-2px) + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) + + &--padding-none + padding: 0 + + &--padding-sm + padding: 1rem + + &--padding-md + padding: 1.5rem + + &--padding-lg + padding: 2rem + + &--variant-elevated + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) + + &--variant-outlined + border-width: 2px + +.card-header + margin-bottom: 1rem + + &:last-child + margin-bottom: 0 + +.card-body + flex: 1 + +.card-footer + margin-top: 1rem + + &:first-child + margin-top: 0 \ No newline at end of file