UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

38 lines (37 loc) 1.25 kB
import React from "react"; import { ButtonProps } from "../../../button"; type DataToolbarToggleButtonProps = Omit<ButtonProps, "variant" | "size" | "data-color" | "children"> & Required<Pick<ButtonProps, "icon">> & { /** * Indicates whether the toggle button is pressed or not. * @default false */ isPressed?: boolean; /** * Default uncontrolled pressed state. * @default false */ defaultPressed?: boolean; /** * Callback for new pressed state. */ onPressChange?: (isPressed: boolean) => void; }; declare const DataToolbarToggleButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "children" | "data-color" | "size" | "variant"> & Required<Pick<ButtonProps, "icon">> & { /** * Indicates whether the toggle button is pressed or not. * @default false */ isPressed?: boolean; /** * Default uncontrolled pressed state. * @default false */ defaultPressed?: boolean; /** * Callback for new pressed state. */ onPressChange?: (isPressed: boolean) => void; } & React.RefAttributes<HTMLButtonElement>>; export { DataToolbarToggleButton }; export default DataToolbarToggleButton; export type { DataToolbarToggleButtonProps };