@pagedotapp/page-avatar-select
v0.0.0-alpha.14
Published
PageAvatarSelect - A reusable React component
Downloads
40
Readme
PageAvatarSelect
A reusable avatarselect component for React applications.
Installation
npm install @pagedotapp/page-avatar-selectUsage
import { PageAvatarSelect } from "@pagedotapp/page-avatar-select"
function App() {
return (
<PageAvatarSelect variant="primary" size="medium">
PageAvatarSelect Content
</PageAvatarSelect>
)
}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
<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 storybookTo run tests:
npm run testTo build the component:
npm run build