feat: split components (#1530)

This commit is contained in:
Himself65
2023-03-10 23:15:19 -06:00
committed by GitHub
parent a795000363
commit 9a04a1e34f
23 changed files with 1925 additions and 130 deletions
@@ -1,20 +1,33 @@
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
import { Link, Typography } from '@mui/material';
import { Meta, Story } from '@storybook/react';
import { expect } from '@storybook/jest';
import { Meta, StoryFn } from '@storybook/react';
import { within } from '@storybook/testing-library';
import { Breadcrumbs } from '..';
export default {
title: 'AFFiNE/Breadcrumbs',
component: Breadcrumbs,
} as Meta;
} as Meta<typeof Breadcrumbs>;
const Template: Story = args => <Breadcrumbs {...args} />;
const Template: StoryFn = args => <Breadcrumbs {...args} />;
export const Primary = Template.bind(undefined);
Primary.play = async ({ canvasElement }) => {
const canvas = within(canvasElement);
const text = canvas.getByText('AFFiNE');
expect(text.getAttribute('data-testid')).toBe('affine');
};
Primary.args = {
children: [
<Link key="1" underline="hover" color="inherit" href="/">
<Link
data-testid="affine"
key="1"
underline="hover"
color="inherit"
href="/"
>
AFFiNE
</Link>,
<Link key="2" underline="hover" color="inherit" href="/Docs/">
@@ -1,5 +1,5 @@
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
import { Meta, Story } from '@storybook/react';
import { Meta, StoryFn } from '@storybook/react';
import { Button } from '..';
import { ButtonProps } from '../ui/button/interface';
@@ -13,7 +13,7 @@ export default {
},
} as Meta<ButtonProps>;
const Template: Story<ButtonProps> = args => <Button {...args} />;
const Template: StoryFn<ButtonProps> = args => <Button {...args} />;
export const Primary = Template.bind(undefined);
Primary.args = {