@pagedotapp/page-item-card
v0.0.0-alpha.14
Published
PageItemCard - A reusable React component
Readme
PageItemCard
A reusable itemcard component for React applications.
Installation
npm install @pagedotapp/page-item-cardUsage
import { PageItemCard } from "@pagedotapp/page-item-card"
function App() {
return (
<PageItemCard variant="primary" size="medium">
PageItemCard Content
</PageItemCard>
)
}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
<PageItemCard variant="default">Default</PageItemCard>
<PageItemCard variant="primary">Primary</PageItemCard>
<PageItemCard variant="secondary">Secondary</PageItemCard>Sizes
<PageItemCard size="small">Small</PageItemCard>
<PageItemCard size="medium">Medium</PageItemCard>
<PageItemCard size="large">Large</PageItemCard>States
<PageItemCard disabled>Disabled</PageItemCard>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