PageAvatarSelect
A reusable avatarselect component for React applications.
Installation
npm install @pagedotapp/page-avatar-select
Usage
import { PageAvatarSelect } from "@pagedotapp/page-avatar-select"
function App() {
return (
<PageAvatarSelect variant="primary" size="medium">
PageAvatarSelect Content
</PageAvatarSelect>
)
}
Props
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
<PageAvatarSelect variant="default">Default</PageAvatarSelect>
<PageAvatarSelect variant="primary">Primary</PageAvatarSelect>
<PageAvatarSelect variant="secondary">Secondary</PageAvatarSelect>
Sizes
<PageAvatarSelect size="small">Small</PageAvatarSelect>
<PageAvatarSelect size="medium">Medium</PageAvatarSelect>
<PageAvatarSelect size="large">Large</PageAvatarSelect>
States
<PageAvatarSelect disabled>Disabled</PageAvatarSelect>
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 storybook
To run tests:
npm run test
To build the component:
npm run build