@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
22 lines • 1.01 kB
TypeScript
import { Except } from 'type-fest';
import { IconButton, IconButtonProps, Polymorphic } from '../..';
declare type OmitIcon<T = Record<string, unknown>> = T extends IconButtonProps ? Except<T, 'icon'> : never;
export declare type ToggleButtonProps<T = Record<string, unknown>> = OmitIcon & PropsWithClass<{
/**
* Set the icon to show when the button is resting.
*/
restingIcon: IconButtonProps['icon'];
/**
* Set the icon to show when the button is pressed/active.
*/
pressedIcon?: IconButtonProps['icon'];
/**
* Set the pressed state of the button. If `pressedIcon` is set,
* the icon will be shown instead of the resting icon.
*/
pressed?: boolean;
}> & T;
declare type PolymorphicToggleButton = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof IconButton>, ToggleButtonProps<Polymorphic.OwnProps<typeof IconButton>>>;
export declare const ToggleButton: PolymorphicToggleButton;
export {};
//# sourceMappingURL=toggle-button.d.ts.map