UNPKG

@atlaskit/checkbox

Version:

A checkbox is an input control that allows a user to select one or more options from a number of choices.

102 lines (82 loc) 2.58 kB
<!-- API Report Version: 2.3 --> ## API Report File for "@atlaskit/checkbox" > 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) ### Table of contents - [Main Entry Types](#main-entry-types) - [Peer Dependencies](#peer-dependencies) ### Main Entry Types <!--SECTION START: Main Entry Types--> ```ts /// <reference types="react" /> import { ForwardRefExoticComponent } from 'react'; import { InputHTMLAttributes } from 'react'; import { MemoExoticComponent } from 'react'; import { default as React_2 } from 'react'; import { RefAttributes } from 'react'; import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent'; // @public const Checkbox: MemoExoticComponent< ForwardRefExoticComponent< Omit< Omit<InputHTMLAttributes<HTMLInputElement>, 'checked' | 'css' | 'disabled' | 'required'>, keyof OwnProps > & OwnProps & RefAttributes<HTMLInputElement> > >; export { Checkbox }; export default Checkbox; // @public (undocumented) export type CheckboxProps = Combine< Omit< React_2.InputHTMLAttributes<HTMLInputElement>, /** * 'disabled', 'required', and 'checked' are omitted so that * consumers must handle state using our props. * * 'css' is added globally to element attributes by emotion. * This was causing a bug, making the css prop required in * some cases. We explicitly omit it to avoid that. * * Because 'className' (which the css prop uses internally) * is still available, this should not break existing usage. */ 'checked' | 'css' | 'disabled' | 'required' >, OwnProps >; // @public (undocumented) type Combine<First, Second> = Omit<First, keyof Second> & Second; // @public type OwnProps = { defaultChecked?: boolean; id?: string; isChecked?: boolean; isDisabled?: boolean; isIndeterminate?: boolean; isInvalid?: boolean; isRequired?: boolean; label?: React_2.ReactChild; name?: string; onChange?: (e: React_2.ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void; value?: number | string; size?: Size; testId?: string; analyticsContext?: Record<string, any>; }; // @public (undocumented) type Size = 'large' | 'medium' | 'small' | 'xlarge'; // (No @packageDocumentation comment for this package) ``` <!--SECTION END: Main Entry Types--> ### Peer Dependencies <!--SECTION START: Peer Dependencies--> ```json { "react": "^16.8.0" } ``` <!--SECTION END: Peer Dependencies-->