feat(component): add storybook (#5079)

This commit is contained in:
Cats Juice
2023-12-04 08:32:19 +00:00
parent 9c50dbc362
commit d911d21d1c
30 changed files with 1640 additions and 50 deletions

View File

@@ -11,19 +11,18 @@ export type DividerProps = PropsWithChildren &
dividerColor?: string;
};
const defaultProps = {
orientation: 'horizontal',
size: 'default',
};
export const Divider = forwardRef<HTMLDivElement, DividerProps>(
(props, ref) => {
const { orientation, className, size, dividerColor, style, ...otherProps } =
{
...defaultProps,
...props,
};
(
{
orientation = 'horizontal',
size = 'default',
dividerColor = 'var(--affine-border-color)',
style,
className,
...otherProps
},
ref
) => {
return (
<div
ref={ref}