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