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