|
|
@ -6,10 +6,9 @@ import type {
|
|
|
|
ButtonDisplay,
|
|
|
|
ButtonDisplay,
|
|
|
|
ButtonSize,
|
|
|
|
ButtonSize,
|
|
|
|
ButtonType,
|
|
|
|
ButtonType,
|
|
|
|
ButtonVariant} from '@tih/ui';
|
|
|
|
ButtonVariant,
|
|
|
|
import {
|
|
|
|
|
|
|
|
Button
|
|
|
|
|
|
|
|
} from '@tih/ui';
|
|
|
|
} from '@tih/ui';
|
|
|
|
|
|
|
|
import { Button } from '@tih/ui';
|
|
|
|
|
|
|
|
|
|
|
|
const buttonTypes: ReadonlyArray<ButtonType> = ['button', 'reset', 'submit'];
|
|
|
|
const buttonTypes: ReadonlyArray<ButtonType> = ['button', 'reset', 'submit'];
|
|
|
|
const buttonSizes: ReadonlyArray<ButtonSize> = ['sm', 'md', 'lg'];
|
|
|
|
const buttonSizes: ReadonlyArray<ButtonSize> = ['sm', 'md', 'lg'];
|
|
|
@ -32,13 +31,13 @@ export default {
|
|
|
|
control: { type: 'select' },
|
|
|
|
control: { type: 'select' },
|
|
|
|
options: buttonAddOnPositions,
|
|
|
|
options: buttonAddOnPositions,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
disabled: {
|
|
|
|
|
|
|
|
control: 'boolean',
|
|
|
|
|
|
|
|
},
|
|
|
|
display: {
|
|
|
|
display: {
|
|
|
|
control: { type: 'select' },
|
|
|
|
control: { type: 'select' },
|
|
|
|
options: buttonDisplays,
|
|
|
|
options: buttonDisplays,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
isDisabled: {
|
|
|
|
|
|
|
|
control: 'boolean',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
isLoading: {
|
|
|
|
isLoading: {
|
|
|
|
control: 'boolean',
|
|
|
|
control: 'boolean',
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -112,7 +111,7 @@ export function Disabled() {
|
|
|
|
{buttonVariants.map((variant) => (
|
|
|
|
{buttonVariants.map((variant) => (
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
key={variant}
|
|
|
|
key={variant}
|
|
|
|
isDisabled={true}
|
|
|
|
disabled={true}
|
|
|
|
label="Click Me"
|
|
|
|
label="Click Me"
|
|
|
|
size="md"
|
|
|
|
size="md"
|
|
|
|
variant={variant}
|
|
|
|
variant={variant}
|
|
|
@ -140,7 +139,7 @@ export function Loading() {
|
|
|
|
{buttonVariants.map((variant) => (
|
|
|
|
{buttonVariants.map((variant) => (
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
key={variant}
|
|
|
|
key={variant}
|
|
|
|
isDisabled={true}
|
|
|
|
disabled={true}
|
|
|
|
isLoading={true}
|
|
|
|
isLoading={true}
|
|
|
|
label="Click Me"
|
|
|
|
label="Click Me"
|
|
|
|
size="md"
|
|
|
|
size="md"
|
|
|
@ -166,8 +165,8 @@ export function Icons() {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
|
|
|
|
disabled={true}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
isDisabled={true}
|
|
|
|
|
|
|
|
label="Click Me"
|
|
|
|
label="Click Me"
|
|
|
|
size="lg"
|
|
|
|
size="lg"
|
|
|
|
variant="primary"
|
|
|
|
variant="primary"
|
|
|
@ -186,8 +185,8 @@ export function Icons() {
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
addonPosition="start"
|
|
|
|
addonPosition="start"
|
|
|
|
|
|
|
|
disabled={true}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
isDisabled={true}
|
|
|
|
|
|
|
|
label="Click Me"
|
|
|
|
label="Click Me"
|
|
|
|
size="lg"
|
|
|
|
size="lg"
|
|
|
|
variant="primary"
|
|
|
|
variant="primary"
|
|
|
@ -205,9 +204,9 @@ export function Icons() {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
|
|
|
|
disabled={true}
|
|
|
|
display="block"
|
|
|
|
display="block"
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
isDisabled={true}
|
|
|
|
|
|
|
|
label="Click Me"
|
|
|
|
label="Click Me"
|
|
|
|
size="lg"
|
|
|
|
size="lg"
|
|
|
|
variant="primary"
|
|
|
|
variant="primary"
|
|
|
@ -231,8 +230,8 @@ export function HiddenLabel() {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
|
|
|
|
disabled={true}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
icon={EnvelopeIcon}
|
|
|
|
isDisabled={true}
|
|
|
|
|
|
|
|
isLabelHidden={true}
|
|
|
|
isLabelHidden={true}
|
|
|
|
label="Click Me"
|
|
|
|
label="Click Me"
|
|
|
|
size="lg"
|
|
|
|
size="lg"
|
|
|
|