@liguelead/design-system 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Button/Button.appearance.ts +66 -62
- package/components/Button/Button.sizes.ts +42 -41
- package/components/Button/Button.styles.ts +46 -50
- package/components/Button/Button.tsx +76 -76
- package/components/Button/Button.types.ts +23 -23
- package/components/Button/index.ts +1 -1
- package/components/Checkbox/Checkbox.styles.ts +115 -66
- package/components/Checkbox/Checkbox.tsx +97 -40
- package/components/Checkbox/Checkbox.types.ts +12 -11
- package/components/Checkbox/index.tsx +2 -2
- package/components/DatePicker/DatePicker.styles.ts +66 -66
- package/components/DatePicker/DatePicker.tsx +135 -135
- package/components/DatePicker/DatePicker.types.ts +29 -29
- package/components/DatePicker/index.ts +1 -1
- package/components/IconButton/IconButton.sizes.ts +34 -41
- package/components/IconButton/IconButton.tsx +70 -70
- package/components/IconButton/index.ts +1 -1
- package/components/InputOpt/InputOpt.styles.ts +75 -0
- package/components/InputOpt/InputOpt.tsx +153 -0
- package/components/InputOpt/InputOpt.types.ts +14 -0
- package/components/InputOpt/index.ts +1 -0
- package/components/InputOpt/utils/focusManagement.ts +31 -0
- package/components/InputOpt/utils/index.ts +2 -0
- package/components/InputOpt/utils/inputValidation.ts +14 -0
- package/components/LinkButton/LinkButton.size.ts +39 -0
- package/components/LinkButton/LinkButton.style.ts +45 -0
- package/components/LinkButton/LinkButton.tsx +75 -0
- package/components/LinkButton/LinkButton.types.ts +11 -0
- package/components/LinkButton/index.ts +1 -0
- package/components/PageWrapper/PageWrapper.tsx +31 -31
- package/components/PageWrapper/index.ts +1 -1
- package/components/RadioButton/RadioButton.inputVariants.ts +133 -0
- package/components/RadioButton/RadioButton.styles.ts +78 -0
- package/components/RadioButton/RadioButton.tsx +88 -0
- package/components/RadioButton/RadioButton.types.ts +33 -0
- package/components/RadioButton/RadioButton.variants.ts +67 -0
- package/components/RadioButton/index.ts +1 -0
- package/components/SegmentedButton/SegmentedButton.styles.ts +29 -29
- package/components/SegmentedButton/SegmentedButton.tsx +43 -49
- package/components/SegmentedButton/SegmentedButton.types.ts +20 -20
- package/components/SegmentedButton/index.ts +1 -1
- package/components/Select/Select.sizes.ts +55 -56
- package/components/Select/Select.states.tsx +40 -69
- package/components/Select/Select.styles.ts +162 -148
- package/components/Select/Select.tsx +152 -144
- package/components/Select/Select.types.ts +35 -36
- package/components/Select/index.ts +1 -1
- package/components/Text/Text.styles.ts +46 -43
- package/components/Text/Text.tsx +27 -27
- package/components/Text/Text.types.ts +44 -42
- package/components/Text/index.ts +1 -1
- package/components/TextField/TextField.sizes.ts +52 -58
- package/components/TextField/TextField.states.tsx +53 -76
- package/components/TextField/TextField.styles.ts +85 -98
- package/components/TextField/TextField.tsx +108 -108
- package/components/TextField/TextField.types.ts +22 -21
- package/components/TextField/index.ts +2 -2
- package/components/TextField/utils/getState.ts +7 -0
- package/components/ThemeProvider/ThemeProvider.tsx +21 -21
- package/components/ThemeProvider/index.ts +1 -1
- package/components/ThemeProvider/style.ts +969 -969
- package/components/Wizard/StepContent.tsx +28 -28
- package/components/Wizard/StepMenuItem.tsx +33 -33
- package/components/Wizard/Wizard.context.tsx +76 -76
- package/components/Wizard/Wizard.styles.ts +126 -126
- package/components/Wizard/Wizard.tsx +55 -55
- package/components/Wizard/index.ts +1 -1
- package/components/index.ts +14 -11
- package/package.json +41 -41
- package/scripts/createTypes.js +70 -70
- package/utils/colorDarken.ts +10 -10
- package/utils/colorLighten.ts +10 -10
- package/utils/darkenOrLighen.ts +19 -19
- package/utils/getTextColor.ts +12 -12
- package/utils/index.ts +5 -5
- package/utils/parseColor.ts +7 -7
|
@@ -1,62 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {colorType} from 'types'
|
|
3
|
-
import {useTheme} from 'styled-components'
|
|
4
|
-
import {darkenOrLighten, getTextColor, parseColor} from '../../utils'
|
|
5
|
-
|
|
6
|
-
export const
|
|
7
|
-
color: colorType,
|
|
8
|
-
|
|
9
|
-
) => {
|
|
10
|
-
const theme = useTheme()
|
|
11
|
-
const parsedColor = parseColor(theme.colors[color])
|
|
12
|
-
|
|
13
|
-
const solidtextColor = parseColor(theme.colors[getTextColor(parsedColor)])
|
|
14
|
-
|
|
15
|
-
const colorHover = darkenOrLighten(0.2, parsedColor)
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
solid: `
|
|
19
|
-
background-color: ${parsedColor};
|
|
20
|
-
color: ${solidtextColor};
|
|
21
|
-
border: 1px solid ${parsedColor};
|
|
22
|
-
&:hover {
|
|
23
|
-
background-color: ${colorHover};
|
|
24
|
-
border-color: ${colorHover};
|
|
25
|
-
}
|
|
26
|
-
&:disabled {
|
|
27
|
-
background-color: ${
|
|
28
|
-
color: ${
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
color:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
color:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
color:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import { ButtonVariantTypes} from './Button.types'
|
|
2
|
+
import {colorType} from 'types'
|
|
3
|
+
import {useTheme} from 'styled-components'
|
|
4
|
+
import {darkenOrLighten, getTextColor, parseColor} from '../../utils'
|
|
5
|
+
|
|
6
|
+
export const ButtonVariant = (
|
|
7
|
+
color: colorType,
|
|
8
|
+
variant: ButtonVariantTypes
|
|
9
|
+
) => {
|
|
10
|
+
const theme = useTheme()
|
|
11
|
+
const parsedColor = parseColor(theme.colors[color])
|
|
12
|
+
|
|
13
|
+
const solidtextColor = parseColor(theme.colors[getTextColor(parsedColor)])
|
|
14
|
+
|
|
15
|
+
const colorHover = darkenOrLighten(0.2, parsedColor)
|
|
16
|
+
|
|
17
|
+
const variants = {
|
|
18
|
+
solid: `
|
|
19
|
+
background-color: ${parsedColor};
|
|
20
|
+
color: ${solidtextColor};
|
|
21
|
+
border: 1px solid ${parsedColor};
|
|
22
|
+
&:hover {
|
|
23
|
+
background-color: ${colorHover};
|
|
24
|
+
border-color: ${colorHover};
|
|
25
|
+
}
|
|
26
|
+
&:disabled {
|
|
27
|
+
background-color: ${parsedColor}80;
|
|
28
|
+
color: ${solidtextColor}cc;
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
border: none;
|
|
31
|
+
}
|
|
32
|
+
`,
|
|
33
|
+
outline: `
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
color: ${parsedColor};
|
|
36
|
+
border: 1px solid ${parsedColor};
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: ${parseColor(theme.colors.primaryDarker)};
|
|
39
|
+
border-color: transparent;
|
|
40
|
+
color: ${parseColor(theme.colors.white)};
|
|
41
|
+
}
|
|
42
|
+
&:disabled {
|
|
43
|
+
background-color: transparent;
|
|
44
|
+
color: ${parseColor(theme.colors.neutral1100)}80;
|
|
45
|
+
border-color: ${parseColor(theme.colors.neutral400)};
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
`,
|
|
49
|
+
ghost: `
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
color: ${parsedColor};
|
|
52
|
+
border: 1px solid transparent;
|
|
53
|
+
&:hover {
|
|
54
|
+
background-color: ${parseColor(theme.colors.primaryDarker)};
|
|
55
|
+
color: ${parseColor(theme.colors.white)};
|
|
56
|
+
}
|
|
57
|
+
&:disabled {
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
color: ${parseColor(theme.colors.neutral1100)}80;
|
|
60
|
+
cursor: not-allowed;
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return variants[variant]
|
|
66
|
+
}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
font-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
border-radius: ${
|
|
29
|
-
`,
|
|
30
|
-
lg: `
|
|
31
|
-
padding: ${spacing.
|
|
32
|
-
font-size: ${fontSize.fontSize16}px;
|
|
33
|
-
font-weight: ${fontWeight.
|
|
34
|
-
line-height: ${lineHeight.lineHeight24}px;
|
|
35
|
-
gap: ${spacing.spacing8}px;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import {
|
|
2
|
+
fontSize,
|
|
3
|
+
fontWeight,
|
|
4
|
+
lineHeight,
|
|
5
|
+
spacing,
|
|
6
|
+
radius
|
|
7
|
+
} from '@liguelead/foundation'
|
|
8
|
+
import { ButtonSizeTypes } from './Button.types'
|
|
9
|
+
|
|
10
|
+
export const ButtonSizes = (size: ButtonSizeTypes) => {
|
|
11
|
+
const sizes = {
|
|
12
|
+
sm: `
|
|
13
|
+
padding: ${spacing.spacing8}px ${spacing.spacing12}px;
|
|
14
|
+
font-size: ${fontSize.fontSize14}px;
|
|
15
|
+
font-weight: ${fontWeight.fontWeight500};
|
|
16
|
+
line-height: ${lineHeight.lineHeight22}px;
|
|
17
|
+
gap: ${spacing.spacing8}px;
|
|
18
|
+
min-width: ${spacing.spacing64}px;
|
|
19
|
+
border-radius: ${radius.radius4}px;
|
|
20
|
+
`,
|
|
21
|
+
md: `
|
|
22
|
+
padding: ${spacing.spacing8}px ${spacing.spacing16}px;
|
|
23
|
+
font-size: ${fontSize.fontSize14}px;
|
|
24
|
+
font-weight: ${fontWeight.fontWeight500};
|
|
25
|
+
line-height: ${lineHeight.lineHeight22}px;
|
|
26
|
+
gap: ${spacing.spacing8}px;
|
|
27
|
+
min-width: ${spacing.spacing76}px;
|
|
28
|
+
border-radius: ${radius.radius4}px;
|
|
29
|
+
`,
|
|
30
|
+
lg: `
|
|
31
|
+
padding: ${spacing.spacing8}px ${spacing.spacing32}px;
|
|
32
|
+
font-size: ${fontSize.fontSize16}px;
|
|
33
|
+
font-weight: ${fontWeight.fontWeight500};
|
|
34
|
+
line-height: ${lineHeight.lineHeight24}px;
|
|
35
|
+
gap: ${spacing.spacing8}px;
|
|
36
|
+
min-width: ${spacing.spacing108}px;
|
|
37
|
+
border-radius: ${radius.radius4}px;
|
|
38
|
+
`
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return sizes[size]
|
|
42
|
+
}
|
|
@@ -1,50 +1,46 @@
|
|
|
1
|
-
import styled from 'styled-components'
|
|
2
|
-
import { ButtonProps } from './Button.types'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
${({ $
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
box-shadow:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
opacity: 0;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`
|
|
1
|
+
import styled from 'styled-components'
|
|
2
|
+
import { ButtonProps } from './Button.types'
|
|
3
|
+
import { shadow } from '@liguelead/foundation'
|
|
4
|
+
|
|
5
|
+
export interface StyledButtonProps extends ButtonProps {
|
|
6
|
+
$variant: string
|
|
7
|
+
$buttonSize: string
|
|
8
|
+
$fluid: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const StyledButton = styled.button<StyledButtonProps>`
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
outline: none !important;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
width: ${({ $fluid }) => ($fluid ? '100%' : 'auto')};
|
|
18
|
+
${({ $buttonSize }) => $buttonSize}
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
outline: none;
|
|
22
|
+
transition: background-color 0.3s, box-shadow 0.3s;
|
|
23
|
+
${({ $variant }) => $variant}
|
|
24
|
+
|
|
25
|
+
&:focus {
|
|
26
|
+
box-shadow: ${shadow.focusShadow};
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
|
+
|
|
30
|
+
export const RippleContainer = styled.span<{
|
|
31
|
+
$variant: string
|
|
32
|
+
}>`
|
|
33
|
+
position: absolute;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
transform: scale(0);
|
|
36
|
+
animation: ripple 0.4s linear;
|
|
37
|
+
background-color:rgba(255, 255, 255, 0.5);
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
|
|
40
|
+
@keyframes ripple {
|
|
41
|
+
to {
|
|
42
|
+
transform: scale(9);
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
|
-
import { StyledButton, RippleContainer } from './Button.styles'
|
|
3
|
-
import { RippleInterface, ButtonProps } from './Button.types'
|
|
4
|
-
import { ButtonSizes } from './Button.sizes'
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const Button: React.FC<ButtonProps> = ({
|
|
8
|
-
|
|
9
|
-
children,
|
|
10
|
-
className,
|
|
11
|
-
color = 'primary',
|
|
12
|
-
disabled,
|
|
13
|
-
fluid = false,
|
|
14
|
-
size = 'md',
|
|
15
|
-
onClick,
|
|
16
|
-
type = 'button',
|
|
17
|
-
...rest
|
|
18
|
-
}) => {
|
|
19
|
-
const [ripples, setRipples] = useState<RippleInterface[]>([])
|
|
20
|
-
|
|
21
|
-
const buttonSize = ButtonSizes(size)
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const removeRipple = (ripples: RippleInterface[], rippleId: string) => {
|
|
25
|
-
return ripples.filter(r => r.id !== rippleId)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
29
|
-
const rect = e.currentTarget.getBoundingClientRect()
|
|
30
|
-
const x = e.clientX - rect.left
|
|
31
|
-
const y = e.clientY - rect.top
|
|
32
|
-
|
|
33
|
-
const newRipple: RippleInterface = {
|
|
34
|
-
id: `${Date.now()}-${Math.random()}`,
|
|
35
|
-
x,
|
|
36
|
-
y
|
|
37
|
-
}
|
|
38
|
-
setRipples(prev => [...prev, newRipple])
|
|
39
|
-
|
|
40
|
-
// Chama o onClick fornecido
|
|
41
|
-
if (onClick) {
|
|
42
|
-
onClick(e)
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<StyledButton
|
|
48
|
-
disabled={disabled}
|
|
49
|
-
className={className}
|
|
50
|
-
$fluid={fluid}
|
|
51
|
-
$
|
|
52
|
-
onClick={handleClick}
|
|
53
|
-
$buttonSize={buttonSize}
|
|
54
|
-
type={type}
|
|
55
|
-
{...rest}>
|
|
56
|
-
{children}
|
|
57
|
-
{ripples.map(ripple => (
|
|
58
|
-
<RippleContainer
|
|
59
|
-
$
|
|
60
|
-
key={ripple.id}
|
|
61
|
-
style={{
|
|
62
|
-
top: ripple.y - 10,
|
|
63
|
-
left: ripple.x - 10,
|
|
64
|
-
width: 20,
|
|
65
|
-
height: 20
|
|
66
|
-
}}
|
|
67
|
-
onAnimationEnd={() =>
|
|
68
|
-
setRipples(prev => removeRipple(prev, ripple.id))
|
|
69
|
-
}
|
|
70
|
-
/>
|
|
71
|
-
))}
|
|
72
|
-
</StyledButton>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export default Button
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { StyledButton, RippleContainer } from './Button.styles'
|
|
3
|
+
import { RippleInterface, ButtonProps } from './Button.types'
|
|
4
|
+
import { ButtonSizes } from './Button.sizes'
|
|
5
|
+
import { ButtonVariant } from './Button.appearance'
|
|
6
|
+
|
|
7
|
+
const Button: React.FC<ButtonProps> = ({
|
|
8
|
+
variant = 'solid',
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
color = 'primary',
|
|
12
|
+
disabled,
|
|
13
|
+
fluid = false,
|
|
14
|
+
size = 'md',
|
|
15
|
+
onClick,
|
|
16
|
+
type = 'button',
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
19
|
+
const [ripples, setRipples] = useState<RippleInterface[]>([])
|
|
20
|
+
|
|
21
|
+
const buttonSize = ButtonSizes(size)
|
|
22
|
+
const buttonVariant = ButtonVariant(color, variant)
|
|
23
|
+
|
|
24
|
+
const removeRipple = (ripples: RippleInterface[], rippleId: string) => {
|
|
25
|
+
return ripples.filter(r => r.id !== rippleId)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
29
|
+
const rect = e.currentTarget.getBoundingClientRect()
|
|
30
|
+
const x = e.clientX - rect.left
|
|
31
|
+
const y = e.clientY - rect.top
|
|
32
|
+
|
|
33
|
+
const newRipple: RippleInterface = {
|
|
34
|
+
id: `${Date.now()}-${Math.random()}`,
|
|
35
|
+
x,
|
|
36
|
+
y
|
|
37
|
+
}
|
|
38
|
+
setRipples(prev => [...prev, newRipple])
|
|
39
|
+
|
|
40
|
+
// Chama o onClick fornecido
|
|
41
|
+
if (onClick) {
|
|
42
|
+
onClick(e)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<StyledButton
|
|
48
|
+
disabled={disabled}
|
|
49
|
+
className={className}
|
|
50
|
+
$fluid={fluid}
|
|
51
|
+
$variant={buttonVariant}
|
|
52
|
+
onClick={handleClick}
|
|
53
|
+
$buttonSize={buttonSize}
|
|
54
|
+
type={type}
|
|
55
|
+
{...rest}>
|
|
56
|
+
{children}
|
|
57
|
+
{ripples.map(ripple => (
|
|
58
|
+
<RippleContainer
|
|
59
|
+
$variant={variant}
|
|
60
|
+
key={ripple.id}
|
|
61
|
+
style={{
|
|
62
|
+
top: ripple.y - 10,
|
|
63
|
+
left: ripple.x - 10,
|
|
64
|
+
width: 20,
|
|
65
|
+
height: 20
|
|
66
|
+
}}
|
|
67
|
+
onAnimationEnd={() =>
|
|
68
|
+
setRipples(prev => removeRipple(prev, ripple.id))
|
|
69
|
+
}
|
|
70
|
+
/>
|
|
71
|
+
))}
|
|
72
|
+
</StyledButton>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default Button
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { colorType } from 'types'
|
|
2
|
-
|
|
3
|
-
export type ButtonSizeTypes = '
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
export interface ButtonProps {
|
|
7
|
-
|
|
8
|
-
children: React.ReactNode
|
|
9
|
-
className?: string
|
|
10
|
-
disabled?: boolean
|
|
11
|
-
fluid?: boolean
|
|
12
|
-
size?: ButtonSizeTypes
|
|
13
|
-
color?: colorType
|
|
14
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void
|
|
15
|
-
type?: 'button' | 'submit' | 'reset'
|
|
16
|
-
style?: React.CSSProperties
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface RippleInterface {
|
|
20
|
-
id: string
|
|
21
|
-
x: number
|
|
22
|
-
y: number
|
|
23
|
-
}
|
|
1
|
+
import { colorType } from 'types'
|
|
2
|
+
|
|
3
|
+
export type ButtonSizeTypes = 'sm' | 'md' | 'lg'
|
|
4
|
+
export type ButtonVariantTypes = 'solid' | 'outline' | 'ghost'
|
|
5
|
+
|
|
6
|
+
export interface ButtonProps {
|
|
7
|
+
variant?: ButtonVariantTypes
|
|
8
|
+
children: React.ReactNode
|
|
9
|
+
className?: string
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
fluid?: boolean
|
|
12
|
+
size?: ButtonSizeTypes
|
|
13
|
+
color?: colorType
|
|
14
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void
|
|
15
|
+
type?: 'button' | 'submit' | 'reset'
|
|
16
|
+
style?: React.CSSProperties
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface RippleInterface {
|
|
20
|
+
id: string
|
|
21
|
+
x: number
|
|
22
|
+
y: number
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './Button'
|
|
1
|
+
export { default } from './Button'
|