Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
description: 'Drawer content.',
},
onClose: {
value: '() => setIsOpen(false);',
type: PropTypes.Function,
description: 'A callback that is invoked when the modal will close.',
propHook: {
what: 'false',
into: 'isOpen',
},
},
size: {
value: 'SIZE.default',
options: SIZE,
defaultValue: 'SIZE.default',
type: PropTypes.Enum,
description: 'Defines the modal size.',
imports: {
'baseui/drawer': {
named: ['SIZE'],
},
},
},
anchor: {
value: 'ANCHOR.default',
options: ANCHOR,
defaultValue: 'ANCHOR.default',
type: PropTypes.Enum,
description: 'Window side from which the drawer originates from.',
imports: {
'baseui/drawer': {
named: ['ANCHOR'],
imports: {
'baseui/tag': {
named: ['KIND'],
},
},
},
color: {
value: undefined,
type: PropTypes.String,
description: `The color theme to be applied to a Tag. To make this custom color active, you have to set kind to custom.`,
},
variant: {
value: 'VARIANT.light',
defaultValue: 'VARIANT.light',
options: VARIANT,
type: PropTypes.Enum,
description:
'Defines tags look. Set it to one of VARIANT[key] values. Defaults to VARIANT.light.',
imports: {
'baseui/tag': {
named: ['VARIANT'],
},
},
},
disabled: {
value: false,
type: PropTypes.Boolean,
description: `Disable the tag from being changed.`,
},
isFocused: {
value: false,
type: PropTypes.Boolean,
usePortal: {
value: true,
defaultValue: true,
type: PropTypes.Boolean,
description: `Indicates if 'createPortal' is used to append the toaster container to the body element.`,
hidden: true,
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Root', 'ToastBody', 'ToastInnerContainer', 'ToastCloseIcon'],
sharedProps: {
$kind: {
type: PropTypes.Enum,
description: 'Defines the type of notification.',
},
$closeable: {
type: PropTypes.Boolean,
description: `When set to true a close button is displayed
and the notification can be dismissed by a user.`,
},
},
},
},
},
mapTokensToProps: {
ToasterContainer: toasterContainerProps,
Button: buttonProps,
Block: blockProps,
},
SIZE,
Block,
},
theme: [
'toastInfoBackground',
'toastPositiveBackground',
'toastWarningBackground',
'toastNegativeBackground',
'toastText',
],
props: {
placement: {
value: 'PLACEMENT.top',
defaultValue: 'PLACEMENT.top',
options: PLACEMENT,
type: PropTypes.Enum,
description: `Defines notifications placement.`,
imports: {
'baseui/toast': {
named: ['PLACEMENT'],
},
},
},
children: {
value: `<button>{
let toastKey;
const msg = 'Use toaster.info(), toaster.positive(), toaster.warning(), or toaster.negative()';
const ok = (
</button><button size="{SIZE.compact}">toaster.clear(toastKey)}>Ok</button>
);
props: {
children: {
value: 'Label',
type: PropTypes.ReactNode,
description: 'List item content.',
},
artwork: {
value: 'props => ',
type: PropTypes.ReactNode,
description: 'Left-hand icon to render in the list item.',
},
artworkSize: {
value: undefined,
options: ARTWORK_SIZES,
enumName: 'ARTWORK_SIZES',
type: PropTypes.Enum,
description: 'Defines the size of the artwork.',
imports: {
'baseui/list': {
named: ['ARTWORK_SIZES'],
},
},
},
endEnhancer: {
value: '() => "Right-Label"',
type: PropTypes.ReactNode,
description: 'Right-hand content to render in the list item.',
},
sublist: {
value: false,
type: PropTypes.Boolean,
description: 'Renders the list item smaller to convey hierarchy.',
imports: {
'baseui/phone-input': {
named: ['PhoneInput'],
},
},
scope: {
PhoneInput,
COUNTRIES,
SIZE,
},
theme,
props: {
country: {
value: undefined,
options: countriesEnum,
type: PropTypes.Enum,
enumName: 'COUNTRIES',
description: 'Input value attribute.',
stateful: true,
imports: {
'baseui/phone-input': {
named: ['COUNTRIES'],
},
},
},
onCountryChange: {
value: '({option}) => setCountry(option)',
type: PropTypes.Function,
description: 'Called when country value is changed.',
propHook: {
what: '"COUNTRIES." + option.id',
into: 'country',
value: 'KIND.primary',
defaultValue: 'KIND.primary',
options: KIND,
type: PropTypes.Enum,
description: 'Defines the kind (purpose) of a button.',
imports: {
'baseui/button': {
named: ['KIND'],
},
},
},
size: {
value: 'SIZE.default',
defaultValue: 'SIZE.default',
options: SIZE,
type: PropTypes.Enum,
description: 'Defines the size of the button.',
imports: {
'baseui/button': {
named: ['SIZE'],
},
},
},
shape: {
value: 'SHAPE.default',
defaultValue: 'SHAPE.default',
options: SHAPE,
type: PropTypes.Enum,
description: 'Defines the shape of the button.',
imports: {
'baseui/button': {
named: ['SHAPE'],
theme: [
'notificationInfoBackground',
'notificationPositiveBackground',
'notificationWarningBackground',
'notificationNegativeBackground',
'notificationInfoText',
'notificationPositiveText',
'notificationWarningText',
'notificationNegativeText',
],
props: {
kind: {
value: 'KIND.info',
defaultValue: 'KIND.info',
options: KIND,
type: PropTypes.Enum,
description: 'Defines the type of notification.',
imports: {
'baseui/notification': {
named: ['KIND'],
},
},
},
closeable: {
value: undefined,
type: PropTypes.Boolean,
description:
'When set to true a close button is displayed and the notification can be dismissed by a user.',
},
children: {
value: '{() => "This is a notification."}',
type: PropTypes.Function,
value: undefined,
type: PropTypes.Boolean,
description: 'Defines if the control is in positive state.',
},
escapeClearsValue: {
value: true,
type: PropTypes.Boolean,
defaultValue: true,
description:
'Defines if the value is cleared when escape is pressed and the dropdown is closed.',
},
size: {
value: 'SIZE.default',
defaultValue: 'SIZE.default',
options: SIZE,
type: PropTypes.Enum,
description:
'Defines the size (scale) of dropdown menu items. See the Menu component API.',
imports: {
'baseui/select': {
named: ['SIZE'],
},
},
},
options: {
value: `[
{label: 'AliceBlue', id: '#F0F8FF'},
{label: 'AntiqueWhite', id: '#FAEBD7'},
{label: 'Aqua', id: '#00FFFF'},
{label: 'Aquamarine', id: '#7FFFD4'},
{label: 'Azure', id: '#F0FFFF'},
{label: 'Beige', id: '#F5F5DC'},
},
isError: {
value: false,
type: PropTypes.Boolean,
description: 'Renders component in error state.',
},
isIndeterminate: {
value: false,
type: PropTypes.Boolean,
description:
'Indicates indeterminate state for the checkmark. Checked property is ignored.',
},
labelPlacement: {
value: 'LABEL_PLACEMENT.right',
options: LABEL_PLACEMENT,
type: PropTypes.Enum,
enumName: 'LABEL_PLACEMENT',
description:
'Determines how to position the label relative to the checkbox.',
imports: {
'baseui/checkbox': {
named: ['LABEL_PLACEMENT'],
},
},
},
required: {
value: false,
type: PropTypes.Boolean,
description: 'Renders component in required state.',
hidden: true,
},
inputRef: {