UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

20 lines (19 loc) 507 B
import React from 'react'; import { SxProp } from './sx'; type BaseProps = SxProp & { disabled?: boolean; required?: boolean; visuallyHidden?: boolean; id?: string; }; export type LabelProps = BaseProps & { htmlFor?: string; as?: 'label'; }; export type LegendOrSpanProps = BaseProps & { as: 'legend' | 'span'; htmlFor?: undefined; }; type Props = LabelProps | LegendOrSpanProps; declare const InputLabel: React.FC<React.PropsWithChildren<Props>>; export default InputLabel;