@atlaskit/toggle
Version:
A toggle is used to view or switch between enabled or disabled states.
88 lines (70 loc) • 2.06 kB
Markdown
<!-- API Report Version: 2.3 -->
> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
- [Main Entry Types](
- [Peer Dependencies](
<!--SECTION START: Main Entry Types-->
```ts
/// <reference types="react" />
import { ForwardRefExoticComponent } from 'react';
import { MemoExoticComponent } from 'react';
import { RefAttributes } from 'react';
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
// @public (undocumented)
type Size = 'large' | 'regular';
// @public
const Toggle: MemoExoticComponent<
ForwardRefExoticComponent<
Pick<
ToggleProps,
| 'analyticsContext'
| 'createAnalyticsEvent'
| 'defaultChecked'
| 'id'
| 'isChecked'
| 'isDisabled'
| 'label'
| 'name'
| 'onBlur'
| 'onChange'
| 'onFocus'
| 'size'
| 'testId'
| 'value'
> &
RefAttributes<HTMLInputElement>
>
>;
export default Toggle;
// @public (undocumented)
interface ToggleProps extends WithAnalyticsEventsProps {
analyticsContext?: Record<string, any>;
defaultChecked?: boolean;
id?: string;
isChecked?: boolean;
isDisabled?: boolean;
label?: string;
name?: string;
onBlur?: (event: React.FocusEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
onChange?: (event: React.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
onFocus?: (event: React.FocusEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void;
size?: Size;
testId?: string;
value?: string;
}
// (No @packageDocumentation comment for this package)
```
<!--SECTION END: Main Entry Types-->
<!--SECTION START: Peer Dependencies-->
```json
{
"react": "^16.8.0"
}
```
<!--SECTION END: Peer Dependencies-->