Skip to content

Commit

Permalink
chore: clear eslint disable
Browse files Browse the repository at this point in the history
  • Loading branch information
gndz07 authored Jul 29, 2024
1 parent d1c594e commit 916f30d
Show file tree
Hide file tree
Showing 32 changed files with 56 additions and 446 deletions.
25 changes: 1 addition & 24 deletions components/Accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Collapsible.argTypes = {
export const MultipleCollapsible: StoryFn<typeof AccordionForStory> = Template.bind({});
MultipleCollapsible.args = {
type: 'multiple',
// @FIXME console warning of this props not being a boolean attribute
collapsible: true,
};
MultipleCollapsible.argTypes = {
Expand Down Expand Up @@ -120,30 +121,6 @@ Complex.argTypes = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof AccordionForStory> = ({ size, ...args }) => (
<Box css={{ width: 300 }}>
<AccordionForStory css={{ maxWidth: 250 }} {...args}>
<AccordionItem css={{ bc: '$hiContrast' }} value="item-1">
<AccordionTrigger css={{ c: '$hiContrast' }} size={size}>
Item1 Trigger
</AccordionTrigger>
<AccordionContent css={{ c: '$hiContrast' }} size={size}>
Item1 Content
</AccordionContent>
</AccordionItem>
<AccordionItem value="item-2">
<AccordionTrigger size={size}>Item2 Trigger</AccordionTrigger>
<AccordionContent size={size}>Item2 Content</AccordionContent>
</AccordionItem>
<AccordionItem value="item-3">
<AccordionTrigger size={size}>Item3 Trigger</AccordionTrigger>
<AccordionContent size={size}>Item3 Content</AccordionContent>
</AccordionItem>
</AccordionForStory>
</Box>
);

export const InsideModal: StoryFn<typeof AccordionForStory> = (args) => {
const [open, setOpen] = useState(false);

Expand Down
8 changes: 4 additions & 4 deletions components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ const StyledAccordionItem = styled(AccordionPrimitive.Item, {
boxShadow: '0 1px 0 0 $colors$divider',
});

export const StyledAccordionHeader = (styled as any)('AccordionPrimitive.Header', {
export const StyledAccordionHeader = styled(AccordionPrimitive.Header, {
all: 'unset',
display: 'flex',
borderRadius: 'inherit',
});

export const StyledAccordionTrigger = (styled as any)(AccordionPrimitive.Trigger, {
export const StyledAccordionTrigger = styled(AccordionPrimitive.Trigger, {
all: 'unset',
borderRadius: 'inherit',
fontFamily: 'inherit',
Expand Down Expand Up @@ -102,7 +102,7 @@ const StyledAccordionChevron = styled(ChevronRightIcon, {
},
});

const StyledAccordionContent = (styled as any)(AccordionPrimitive.Content, {
const StyledAccordionContent = styled(AccordionPrimitive.Content, {
overflow: 'hidden',
fontSize: '$3',
c: '$accordionText',
Expand All @@ -114,7 +114,7 @@ const StyledAccordionContent = (styled as any)(AccordionPrimitive.Content, {
},
});

const StyledAccordionContentWrapper = (styled as any)('div', {
const StyledAccordionContentWrapper = styled('div', {
variants: {
size: {
small: {
Expand Down
14 changes: 0 additions & 14 deletions components/Alert/Alert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,4 @@ Variants.argTypes = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof AlertForStory> = (args) => (
<Alert {...args} css={{ mt: '$1' }}>
<H2 css={{ mb: '$3' }}>Alert</H2>
<Text css={{ mb: '$3' }}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</Text>
</Alert>
);

export default Component;
73 changes: 2 additions & 71 deletions components/AriaTable/AriaTable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const Interactive: StoryFn<any> = (args) => {
active: selectedRow === rowNum,
onClick: () => setSelectedRow(rowNum),
}),
[selectedRow, setSelectedRow]
[selectedRow, setSelectedRow],
);

return (
Expand Down Expand Up @@ -282,75 +282,6 @@ export const Links: StoryFn<any> = (args) => (
</Table>
);

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<any> = (args) => (
<TableForStory
css={{ c: '$hiContrast' }}
aria-label="People"
aria-describedby="basic-table-caption"
{...args}
>
<Caption css={{ c: '$hiContrast' }} id="basic-table-caption">
People with some information
</Caption>
<Thead css={{ c: '$hiContrast' }}>
<Tr css={{ c: '$hiContrast' }}>
<Th css={{ c: '$hiContrast' }}>first name</Th>
<Th>last name</Th>
<Th>Status</Th>
<Th>Role</Th>
</Tr>
</Thead>
<Tbody css={{ c: '$hiContrast' }}>
<Tr>
<Td>John</Td>
<Td>Doe</Td>
<Td>
<Badge variant="green">Connected</Badge>
</Td>
<Td>Developer</Td>
</Tr>
<Tr>
<Td>Johny</Td>
<Td>Depp</Td>
<Td>
<Badge variant="orange">AFK</Badge>
</Td>
<Td>Actor</Td>
</Tr>
<Tr>
<Td>Natalie</Td>
<Td>Portman</Td>
<Td>
<Badge variant="green">Connected</Badge>
</Td>
<Td>Actor</Td>
</Tr>
<Tr>
<Td>Luke</Td>
<Td>Skywalker</Td>
<Td>
<Badge variant="red">Disconnected</Badge>
</Td>
<Td>Star wars</Td>
</Tr>
</Tbody>
<Tfoot css={{ c: '$hiContrast' }}>
<Tr>
<Td css={{ textAlign: 'center' }}>
<Button
ghost
variant="secondary"
css={{ fontSize: '$1', height: '$5', boxShadow: 'none' }}
>
Load more...
</Button>
</Td>
</Tr>
</Tfoot>
</TableForStory>
);

export const Columns: StoryFn<any> = ({ transform, ...args }) => (
<Flex direction="column" gap="4">
<TableForStory aria-label="People" aria-describedby="basic-table-caption" {...args}>
Expand Down Expand Up @@ -604,7 +535,7 @@ export const CollapsibleRow: StoryFn<any> = (args) => {
active: selectedRow === rowNum,
onClick: () => setSelectedRow(rowNum),
}),
[selectedRow, setSelectedRow]
[selectedRow, setSelectedRow],
);

return (
Expand Down
3 changes: 0 additions & 3 deletions components/Avatar/Avatar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,4 @@ Variants.argTypes = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof Avatar> = (args) => <Avatar css={{ c: '$hiContrast' }} {...args} />;

export default Component;
7 changes: 0 additions & 7 deletions components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ Interactive.args = {
borderless: false,
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof BadgeForStory> = (args) => (
<Badge css={{ c: '$hiContrast' }} {...args}>
Customize
</Badge>
);

export const BadgeLink: StoryFn<typeof BadgeForStory> = (args) => (
<Badge asChild interactive {...args}>
<UnstyledLink href="https://traefik.io">Link</UnstyledLink>
Expand Down
5 changes: 0 additions & 5 deletions components/Bubble/Bubble.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,4 @@ Sizes.argTypes = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof BubbleForStory> = (args) => (
<Bubble {...args} css={{ c: '$hiContrast' }} />
);

export default Component;
11 changes: 2 additions & 9 deletions components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ const TemplateWithIcon: StoryFn<typeof ButtonForStory> = (args) => (

export const WithIcon: StoryFn<typeof ButtonForStory> = TemplateWithIcon.bind({});

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const TemplateWithActive: StoryFn<typeof ButtonForStory> = ({ state, ...args }) => {
const TemplateWithActive: StoryFn<typeof ButtonForStory> = ({ ...args }) => {
const [active, setActive] = React.useState(0);

return (
Expand All @@ -67,6 +66,7 @@ const TemplateWithActive: StoryFn<typeof ButtonForStory> = ({ state, ...args })
<Flex css={{ gap: '$3' }}>
{[...Array(4)].map((_, i) => (
<ButtonForStory
key={`button-story-${i}`}
{...args}
{...(active === i ? { state: 'active' } : {})}
onClick={() => setActive(i)}
Expand All @@ -89,13 +89,6 @@ Waiting.args = {
state: 'waiting',
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof ButtonForStory> = (args) => (
<ButtonForStory css={{ c: '$hiContrast' }} {...args}>
Button
</ButtonForStory>
);

export const ButtonLink: StoryFn<typeof ButtonForStory> = (args) => (
<ButtonForStory asChild {...args}>
<UnstyledLink href="https://traefik.io">Button</UnstyledLink>
Expand Down
5 changes: 0 additions & 5 deletions components/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,4 @@ export const Elevation: StoryFn<typeof Card> = () => (

Elevation.args = {};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof Card> = (args) => (
<Card css={{ c: '$hiContrast' }} {...args}></Card>
);

export default Component;
5 changes: 0 additions & 5 deletions components/Checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,4 @@ Disabled.args = {
size: 'large',
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof CheckboxForStory> = (args) => (
<CheckboxForStory css={{ c: '$hiContrast' }} {...args} />
);

export default Component;
33 changes: 0 additions & 33 deletions components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,39 +76,6 @@ export const Basic: StoryFn<typeof Dialog> = () => {
);
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof Dialog> = () => {
const [open, setOpen] = useState(false);

return (
<Dialog open={open} onOpenChange={(isOpen) => setOpen(isOpen)}>
<DialogTrigger asChild>
<Button onClick={() => setOpen(true)}>Open dialog</Button>
</DialogTrigger>

<Box>
{[...Array(10)].map((_, i) => (
<Text key={i} css={{ my: '$1' }}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
</Text>
))}
</Box>

<DialogPortal>
<DialogOverlay />
<DialogContent css={{ c: '$hiContrast' }} elevation={2}>
<Content />
</DialogContent>
</DialogPortal>
</Dialog>
);
};

export const NoCloseIcon: StoryFn<typeof Dialog> = () => {
const [open, setOpen] = useState(false);

Expand Down
31 changes: 0 additions & 31 deletions components/DropdownMenu/DropdownMenu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,4 @@ DefaultOpen.args = {
defaultOpen: true,
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof DropdownMenu> = (args) => (
<DropdownMenu {...args}>
<DropdownMenuTrigger asChild>
<Button>Dropdown</Button>
</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuContent css={{ c: '$hiContrast' }} align="end">
<DropdownMenuGroup css={{ c: '$hiContrast' }}>
<DropdownMenuItem css={{ c: '$hiContrast' }}>Item</DropdownMenuItem>
<DropdownMenuItem>Item</DropdownMenuItem>
<DropdownMenuItem>Item</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuCheckboxItem css={{ c: '$hiContrast' }}>Item</DropdownMenuCheckboxItem>
<DropdownMenuCheckboxItem checked>Item</DropdownMenuCheckboxItem>
<DropdownMenuCheckboxItem>Item</DropdownMenuCheckboxItem>
<DropdownMenuSeparator css={{ c: '$hiContrast' }} />
<DropdownMenuLabel css={{ c: '$hiContrast' }}>Choose one</DropdownMenuLabel>
<DropdownMenuRadioGroup css={{ c: '$hiContrast' }} value="one">
<DropdownMenuRadioItem value="one" css={{ c: '$hiContrast' }}>
Item
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="two">Item</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="three">Item</DropdownMenuRadioItem>
</DropdownMenuRadioGroup>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenuPortal>
</DropdownMenu>
);

export default Component;
5 changes: 0 additions & 5 deletions components/Elevation/Elevation.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,4 @@ Basic.argTypes = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof Elevation> = () => (
<Elevation css={{ c: '$hiContrast' }} variant={0} />
);

export default Component;
3 changes: 0 additions & 3 deletions components/Flex/Flex.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ Basic.args = {
gap: '6',
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof Flex> = (args) => <Flex {...args} css={{ c: '$hiContrast' }} />;

export default Component;
3 changes: 0 additions & 3 deletions components/Grid/Grid.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ Basic.args = {
gap: '6',
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof Grid> = (args) => <Grid {...args} css={{ c: '$hiContrast' }} />;

export default Component;
7 changes: 0 additions & 7 deletions components/Heading/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,4 @@ export const Transform: StoryFn<typeof H1> = (args) => (
</Flex>
);

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof H1> = (args) => (
<H1 css={{ fontWeight: '$semiBold' }} {...args}>
Heading level 1 SemiBold
</H1>
);

export default Component;
5 changes: 0 additions & 5 deletions components/IconButton/IconButton.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,4 @@ Variants.argTypes = {
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Customize: StoryFn<typeof IconButton> = (args) => (
<IconButton css={{ c: '$hiContrast' }} {...args} size="1"></IconButton>
);

export default Component;
Loading

0 comments on commit 916f30d

Please sign in to comment.