UNPKG

@workday/canvas-kit-preview-react

Version:

Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.

73 lines 2.92 kB
import React from 'react'; import { Themeable, ExtractProps } from '@workday/canvas-kit-react/common'; import { Flex } from '@workday/canvas-kit-react/layout'; import { CSProps } from '@workday/canvas-kit-styling'; interface RadioLabelContextInterface { disabled?: boolean | undefined; variant?: 'inverse' | undefined; value?: string | number; } export interface RadioLabelProps extends Themeable, CSProps, ExtractProps<typeof Flex, never>, RadioLabelContextInterface { /** * The Radio input and label children of RadioLabel */ children?: React.ReactNode; } export declare const RadioLabelContext: React.Context<RadioLabelContextInterface>; export declare const RadioLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"label", RadioLabelProps, { onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; state: { value: string | number | undefined; name: string; 'aria-describedby': string | undefined; inputRef: React.MutableRefObject<HTMLInputElement | undefined>; }; events: {}; }> & { /** * Use `RadioGroup.Label.Input` within a `RadioGroup.Label` to render the input portion of a radio button. * * ```tsx * <RadioGroup name"pizza-crust" value="deep-dish"> * <RadioGroup.Label> * <RadioGroup.Label.Input value="deep-dish" /> * <RadioGroup.Label.Text>Deep dish</RadioGroup.Label.Text> * </RadioGroup.Label> * </RadioGroup> * ``` */ Input: import("@workday/canvas-kit-react/common").ElementComponentM<"input", RadioLabelProps, { onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; state: { value: string | number | undefined; name: string; 'aria-describedby': string | undefined; inputRef: React.MutableRefObject<HTMLInputElement | undefined>; }; events: {}; }>; /** * Use `RadioGroup.Label.Text` within a `RadioGroup.Label` to render the label text portion of a radio button. * * ```tsx * <RadioGroup name"pizza-crust" value="deep-dish"> * <RadioGroup.Label> * <RadioGroup.Label.Input value="deep-dish" /> * <RadioGroup.Label.Text>Deep dish</RadioGroup.Label.Text> * </RadioGroup.Label> * </RadioGroup> * ``` */ Text: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("@workday/canvas-kit-react/text").TextProps & React.HTMLAttributes<HTMLSpanElement>, { onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; state: { value: string | number | undefined; name: string; 'aria-describedby': string | undefined; inputRef: React.MutableRefObject<HTMLInputElement | undefined>; }; events: {}; }>; }; export {}; //# sourceMappingURL=RadioLabel.d.ts.map