chore(prettier): full repo linting and code reformatting once and for all (#3627)
This commit is contained in:
1 parent
01500a2d4c
commit
9045ddaedc
656 files changed
+21737
-20628
No files matched your search
@@ -11,16 +11,14 @@ const sizeClasses = {
|
||||
const layoutClasses =
|
||||
'box-content inline-flex flex-row items-center justify-center gap-[5px] justify center px-[10px] outline-none rounded';
|
||||
|
||||
const baseFontTextClasses =
|
||||
'leading-[1.2] font-sans text-center whitespace-nowrap';
|
||||
const baseFontTextClasses = 'leading-[1.2] font-sans text-center whitespace-nowrap';
|
||||
|
||||
const fontTextClasses = {
|
||||
[ButtonEnums.type.primary]: classnames(baseFontTextClasses, 'font-semibold'),
|
||||
[ButtonEnums.type.secondary]: classnames(baseFontTextClasses, 'font-400'),
|
||||
};
|
||||
|
||||
const baseEnabledEffectClasses =
|
||||
'transition duration-300 ease-in-out focus:outline-none';
|
||||
const baseEnabledEffectClasses = 'transition duration-300 ease-in-out focus:outline-none';
|
||||
|
||||
const enabledEffectClasses = {
|
||||
[ButtonEnums.type.primary]: classnames(
|
||||
@@ -48,8 +46,7 @@ const enabledClasses = {
|
||||
),
|
||||
};
|
||||
|
||||
const disabledClasses =
|
||||
'bg-inputfield-placeholder text-common-light cursor-default';
|
||||
const disabledClasses = 'bg-inputfield-placeholder text-common-light cursor-default';
|
||||
|
||||
const defaults = {
|
||||
color: 'default',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Button, ButtonEnums} from '../../../components';
|
||||
import { Button, ButtonEnums } from '../../../components';
|
||||
import { ArgsTable, Story, Canvas, Meta } from '@storybook/addon-docs';
|
||||
import {
|
||||
createComponentTemplate,
|
||||
@@ -10,11 +10,17 @@ export const argTypes = {
|
||||
title: 'Components/Button',
|
||||
};
|
||||
|
||||
<Meta title="Components/Button" component={Button} />
|
||||
<Meta
|
||||
title="Components/Button"
|
||||
component={Button}
|
||||
/>
|
||||
|
||||
export const buttonTemplate = createComponentTemplate(Button);
|
||||
|
||||
<Heading title="Button" componentRelativePath="Button/Button.tsx" />
|
||||
<Heading
|
||||
title="Button"
|
||||
componentRelativePath="Button/Button.tsx"
|
||||
/>
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Props](#props)
|
||||
@@ -23,11 +29,14 @@ export const buttonTemplate = createComponentTemplate(Button);
|
||||
|
||||
## Overview
|
||||
|
||||
You can use the button component to create a button. It can be used in different
|
||||
ways, the default button is a simple button with text.
|
||||
You can use the button component to create a button. It can be used in different ways, the default
|
||||
button is a simple button with text.
|
||||
|
||||
<Canvas>
|
||||
<Story name="Overview" args={{ children: 'Button', color: 'default' }}>
|
||||
<Story
|
||||
name="Overview"
|
||||
args={{ children: 'Button', color: 'default' }}
|
||||
>
|
||||
{buttonTemplate.bind({})}
|
||||
</Story>
|
||||
</Canvas>
|
||||
@@ -53,8 +62,8 @@ There can be different types of buttons: `primary`, and `secondary`.
|
||||
|
||||
### Sizes
|
||||
|
||||
There are different sizes for the button: `small`, and `medium`. The size refers
|
||||
to the button's height.
|
||||
There are different sizes for the button: `small`, and `medium`. The size refers to the button's
|
||||
height.
|
||||
|
||||
<Canvas>
|
||||
<Story name="Colors">
|
||||
@@ -71,7 +80,10 @@ You can mix different props together to create a button.
|
||||
|
||||
<Canvas>
|
||||
<Story name="Custom">
|
||||
<Button type={ButtonEnums.type.secondary} size={ButtonEnums.size.small}>
|
||||
<Button
|
||||
type={ButtonEnums.type.secondary}
|
||||
size={ButtonEnums.size.small}
|
||||
>
|
||||
Small, Secondary Button
|
||||
</Button>
|
||||
</Story>
|
||||
@@ -143,7 +155,10 @@ End Icon is the same as start icon, but for the end of the button.
|
||||
);
|
||||
};
|
||||
return (
|
||||
<Button startIcon={<Github />} endIcon={<Github />}>
|
||||
<Button
|
||||
startIcon={<Github />}
|
||||
endIcon={<Github />}
|
||||
>
|
||||
Start and End Icon Button
|
||||
</Button>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user