@simpledotstudio/simple-item-card
v2.0.0-alpha.7
Published
SimpleItemCard - A reusable React component
Readme
SimpleItemCard
A reusable itemcard component for React applications.
Installation
npm install @simpledotstudio/simple-item-cardUsage
import { SimpleItemCard } from '@simpledotstudio/simple-item-card';
function App() {
return (
<SimpleItemCard variant="primary" size="medium">
SimpleItemCard Content
</SimpleItemCard>
);
}Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| children | React.ReactNode | - | Component children |
| className | string | '' | Additional CSS class name |
| variant | 'default' \| 'primary' \| 'secondary' | 'default' | Component variant |
| size | 'small' \| 'medium' \| 'large' | 'medium' | Component size |
| disabled | boolean | false | Disabled state |
Examples
Variants
<SimpleItemCard variant="default">Default</SimpleItemCard>
<SimpleItemCard variant="primary">Primary</SimpleItemCard>
<SimpleItemCard variant="secondary">Secondary</SimpleItemCard>Sizes
<SimpleItemCard size="small">Small</SimpleItemCard>
<SimpleItemCard size="medium">Medium</SimpleItemCard>
<SimpleItemCard size="large">Large</SimpleItemCard>States
<SimpleItemCard disabled>Disabled</SimpleItemCard>Styling
The component uses CSS modules for styling. You can override styles by passing a custom className or by targeting the component's CSS classes in your global styles.
Development
To run the component in development mode:
npm run storybookTo run tests:
npm run testTo lint the component:
npm run lint