@simpledotstudio/simple-item-card-small
v2.0.0-alpha.4
Published
SimpleItemCardSmall - A reusable React component
Readme
SimpleItemCardSmall
A reusable itemcardsmall component for React applications.
Installation
npm install @simpledotstudio/simple-item-card-smallUsage
import { SimpleItemCardSmall } from '@simpledotstudio/simple-item-card-small';
function App() {
return (
<SimpleItemCardSmall variant="primary" size="medium">
SimpleItemCardSmall Content
</SimpleItemCardSmall>
);
}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
<SimpleItemCardSmall variant="default">Default</SimpleItemCardSmall>
<SimpleItemCardSmall variant="primary">Primary</SimpleItemCardSmall>
<SimpleItemCardSmall variant="secondary">Secondary</SimpleItemCardSmall>Sizes
<SimpleItemCardSmall size="small">Small</SimpleItemCardSmall>
<SimpleItemCardSmall size="medium">Medium</SimpleItemCardSmall>
<SimpleItemCardSmall size="large">Large</SimpleItemCardSmall>States
<SimpleItemCardSmall disabled>Disabled</SimpleItemCardSmall>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