UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

28 lines (27 loc) 969 B
import { PropsFor } from "../../types"; export type FeedbackProps = PropsFor<"div", { /** Available states: `"default"` and `"alert"` */ state?: "default" | "alert"; }>; /** * Display feedback for a group of inputs, radio buttons or a button group. * * Equivalent to `feedback` prop for `<Input>`, `<TextArea>`, `<DatePicker>`, * `<Select>`, and `<FieldGroup>`. * * @see https://bifrost.intility.com/react/feedback * * @example * <Feedback>Feedback text</Feedback> * * <Feedback state="alert">Red feedback text</Feedback> * * // Pass an empty string to reserve space (to avoid jumping UI) * <Feedback>{""}</Feedback> * * // connect to an input using `aria-describedby` * <input aria-describedby="my-feedback-id" type="text" /> * <Feedback id="my-feedback-id">Feedback text</Feedback> */ declare const Feedback: import("react").ForwardRefExoticComponent<FeedbackProps & import("react").RefAttributes<HTMLDivElement>>; export default Feedback;