mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
feat(component): add storybook (#5079)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import type { Meta, StoryFn } from '@storybook/react';
|
||||
|
||||
import { ScrollableContainer, type ScrollableContainerProps } from '.';
|
||||
|
||||
export default {
|
||||
title: 'UI/Scrollbar',
|
||||
component: ScrollableContainer,
|
||||
} satisfies Meta<typeof ScrollableContainer>;
|
||||
|
||||
const Template: StoryFn<ScrollableContainerProps> = args => (
|
||||
<div style={{ height: '100px', width: '100%' }}>
|
||||
<ScrollableContainer {...args}>
|
||||
<ul>
|
||||
{Array.from({ length: 100 }).map((_, index) => (
|
||||
<li key={index}>item {index}</li>
|
||||
))}
|
||||
</ul>
|
||||
</ScrollableContainer>
|
||||
</div>
|
||||
);
|
||||
|
||||
export const Default: StoryFn<ScrollableContainerProps> =
|
||||
Template.bind(undefined);
|
||||
Default.args = {};
|
||||
Reference in New Issue
Block a user