Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const TextareaConfig: TConfig = {
imports: {
'baseui/textarea': {named: ['Textarea']},
},
scope: {
Textarea,
SIZE,
ADJOINED,
},
theme,
props: {
...omit(inputProps, ['type', 'startEnhancer', 'endEnhancer']),
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Input', 'InputContainer'],
sharedProps: {
$isFocused: {
type: PropTypes.Boolean,
description: 'True when the component is focused.',
},
$disabled: 'disabled',
$error: 'error',
$positive: 'positive',
$adjoined: 'adjoined',
$size: 'size',
$required: 'required',
},
},
value: '',
},
...omit(inputProps, [
'type',
'startEnhancer',
'endEnhancer',
'value',
'placeholder',
]),
placeholder: {
...inputProps.placeholder,
value: undefined,
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Root', 'Input', 'InputContainer', 'IconWrapper'],
sharedProps: {
$isFocused: {
type: PropTypes.Boolean,
description: 'True when the component is focused.',
},
$disabled: 'disabled',
$error: 'error',
$positive: 'positive',
$adjoined: 'adjoined',
$size: 'size',
$required: 'required',
},
},
'baseui/accordion': {named: ['Panel']},
},
},
onChange: {
value: '({expanded}) => console.log(expanded)',
type: PropTypes.Function,
description: 'Called when a panel is expanded.',
},
disabled: {
value: false,
type: PropTypes.Boolean,
description: 'Renders component in disabled state.',
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Content', 'Header', 'PanelContainer', 'Root', 'ToggleIcon'],
sharedProps: {
$disabled: 'disabled',
},
},
},
},
mapTokensToProps: {
Accordion: accordionProps,
Panel: panelProps,
},
};
export default AccordionConfig;
<span>Current Page</span>
`,
type: PropTypes.ReactNode,
description: 'Elements separated by divider',
imports: {
'baseui/link': {named: ['StyledLink']},
},
},
ariaLabel: {
value: undefined,
description: 'Elements separated by divider',
type: PropTypes.String,
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Root', 'Separator', 'List', 'ListItem', 'Icon'],
sharedProps: {},
},
},
},
mapTokensToProps: {
Breadcrumbs: breadcrumbsProps,
},
};
export default BreadcrumbsConfig;
value: undefined,
type: PropTypes.Function,
description: `A callback function called when a notification is dismissed.`,
placeholder: '() => {}',
},
autoHideDuration: {
value: undefined,
type: PropTypes.Number,
description: `The number of milliseconds to wait before automatically dismissing a
notification. This behavior is disabled when the value is set to 0.`,
placeholder: '10000',
},
...pick(changeHandlers, ['onMouseEnter', 'onMouseLeave']),
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Body', 'CloseIcon', 'InnerContainer'],
sharedProps: {
$kind: 'kind',
$closeable: 'closeable',
},
},
},
},
mapTokensToProps: {
Notification: notificationProps,
},
};
export default NotificationConfig;
value: undefined,
placeholder: '() => alert("click")',
type: PropTypes.Function,
description: `onkeydown handler for the tag.`,
hidden: true,
},
onActionKeyDown: {
value: undefined,
placeholder: '() => alert("click")',
type: PropTypes.Function,
description: `keydown handler for the action button element.`,
hidden: true,
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Root', 'Action', 'ActionIcon', 'Text'],
sharedProps: {
$kind: 'kind',
$variant: 'variant',
$closeable: 'closeable',
$isActive: {
type: PropTypes.Boolean,
description: 'Is tag active.',
},
$disabled: 'disabled',
$isHovered: 'isHovered',
$isFocused: 'isFocused',
},
},
type: PropTypes.String,
description: 'Currently selected item id.',
stateful: true,
},
onChange: {
value: '({item}) => setActiveItemId(item.itemId)',
type: PropTypes.Function,
description: 'Called when item is clicked.',
propHook: {
what: 'item.itemId',
into: 'activeItemId',
},
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: [
'Root',
'NavItemContainer',
'NavLink',
'NavItem',
'SubNavContainer',
],
sharedProps: {
$active: {
type: PropTypes.Boolean,
description: 'True if nav item is active.',
},
$level: {
type: PropTypes.Number,
},
},
},
isLoading: {
value: false,
type: PropTypes.Boolean,
description: 'Show loading button style and spinner.',
},
isSelected: {
value: false,
type: PropTypes.Boolean,
description: 'Indicates that the button is selected.',
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: [
'BaseButton',
'EndEnhancer',
'LoadingSpinner',
'LoadingSpinnerContainer',
'StartEnhancer',
],
sharedProps: {
$kind: 'kind',
$isSelected: 'isSelected',
$shape: 'shape',
$size: 'size',
$isLoading: 'isLoading',
$disabled: 'disabled',
imports: {
'baseui/input': {
named: ['Input'],
},
},
scope: {
Input,
SIZE,
ADJOINED,
},
theme,
props: {
...inputProps,
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: [
'Root',
'Input',
'InputContainer',
'After',
'Before',
'ClearIcon',
'ClearIconContainer',
'EndEnhancer',
'MaskToggleButton',
'MaskToggleHideIcon',
'MaskToggleShowIcon',
'StartEnhancer',
],
},
},
},
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.',
},
overrides: {
value: undefined,
type: PropTypes.Custom,
description: 'Lets you customize all aspects of the component.',
custom: {
names: ['Root', 'ArtworkContainer', 'Content', 'EndEnhancerContainer'],
sharedProps: {
$artworkSize: 'artworkSize',
$mLeft: {
type: PropTypes.Boolean,
description: 'True when an artwork is present.',
},
$sublist: 'sublist',
},
},
},
},
mapTokensToProps: {
ListItem: listItemProps,