UNPKG

@capgeminiuk/dcx-react-library

Version:

[![CircleCI](https://circleci.com/gh/Capgemini/dcx-react-library.svg?style=svg)](https://circleci.com/gh/Capgemini/dcx-react-library)

50 lines (49 loc) 1.17 kB
import React from 'react'; interface ToggleProps { /** * set the value to check on or off */ checked: boolean; /** * color when is checked */ onColor: string; /** * color when if not checked */ offColor: string; /** * handle the check value */ onChange: (checked: boolean, evt?: React.FormEvent<HTMLInputElement>) => void; /** * define your own style */ className?: string; /** * the color of the handler */ handleColor?: string; /** * define the style by default is 34px */ borderRadius?: string; /** * disable value */ disabled?: boolean; /** * specify a custom element for on state */ customOnLabel?: JSX.Element; /** * specify a custom element for off state */ customOffLabel?: JSX.Element; /** * will alloww to specify extra properties for the input */ inputProps?: any; } export declare const Toggle: ({ className, checked, onChange, onColor, offColor, borderRadius, disabled, customOnLabel, customOffLabel, inputProps, }: ToggleProps) => React.JSX.Element; export {};