UNPKG

wix-style-react

Version:
41 lines 1.78 kB
export default SegmentedToggle; declare class SegmentedToggle extends React.Component<any, any, any> { static displayName: string; static propTypes: { /** Applies a data-hook HTML attribute that can be used in the tests */ dataHook: PropTypes.Requireable<string>; /** Specifies the initially selected option */ defaultSelected: PropTypes.Requireable<PropTypes.ReactNodeLike>; /** Specifies whether an option is selected */ selected: PropTypes.Requireable<PropTypes.ReactNodeLike>; /** Controls the size of the segmented toggle */ size: PropTypes.Requireable<string>; /** Defines a callback function which is called every time option is clicked. Returns a selected element and its value. */ onClick: PropTypes.Requireable<(...args: any[]) => any>; /** Specifies whether interactions are disabled. */ disabled: PropTypes.Requireable<boolean>; /** Accepts <SegmentedToggle.Icon/> or <SegmentedToggle.Button/> as child items to list down available options */ children: PropTypes.Validator<any[]>; }; static defaultProps: { children: never[]; size: string; }; constructor(props: any); constructor(props: any, context: any); state: { selected: any; }; _onClick: (evt: any) => any; _addDividers: (childrenNodes: any, disabled: any) => any[]; render(): React.JSX.Element; } declare namespace SegmentedToggle { export { ToggleButton as Button }; export { ToggleIcon as Icon }; } import React from 'react'; import PropTypes from 'prop-types'; import ToggleButton from './ToggleButton/ToggleButton'; import ToggleIcon from './ToggleIcon/ToggleIcon'; //# sourceMappingURL=SegmentedToggle.d.ts.map