@simpledotstudio/simple-scroll-list
v1.0.0-alpha.4
Published
SimpleScrollList - A reusable React component
Readme
SimpleScrollList
A reusable scrolllist component for React applications.
Installation
npm install @simpledotstudio/simple-scroll-listUsage
import { SimpleScrollList } from '@simpledotstudio/simple-scroll-list';
function App() {
return (
<SimpleScrollList variant="primary" size="medium">
SimpleScrollList Content
</SimpleScrollList>
);
}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
<SimpleScrollList variant="default">Default</SimpleScrollList>
<SimpleScrollList variant="primary">Primary</SimpleScrollList>
<SimpleScrollList variant="secondary">Secondary</SimpleScrollList>Sizes
<SimpleScrollList size="small">Small</SimpleScrollList>
<SimpleScrollList size="medium">Medium</SimpleScrollList>
<SimpleScrollList size="large">Large</SimpleScrollList>States
<SimpleScrollList disabled>Disabled</SimpleScrollList>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