@combine-labs/combine-polaris
Version:
Combine Lab's product component library. Forked from Shopify's Polaris.
26 lines (25 loc) • 947 B
TypeScript
import * as React from 'react';
import { Action, Error } from '../../types';
import { Props as LabelProps, labelID } from '../Label';
export { Action, labelID };
export interface Props {
/** A unique identifier for the label */
id: LabelProps['id'];
/** Text for the label */
label: string;
/** Error to display beneath the label */
error?: Error | boolean;
/** An action */
action?: Action;
/** Additional hint text to display */
helpText?: React.ReactNode;
/** Content to display inside the connected */
children?: React.ReactNode;
/** Visually hide the label */
labelHidden?: boolean;
/** Is an optional field */
optional?: boolean;
}
export default function Labelled({ id, label, error, action, helpText, children, labelHidden, optional, ...rest }: Props): JSX.Element;
export declare function errorID(id: string): string;
export declare function helpTextID(id: string): string;