UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

103 lines 4.23 kB
export declare const useBannerModel: (<TT_Special_Generic>(config?: (Partial<{ /** * Optional flag to denote the banner has an error to display. When true the default `Banner.Icon` * will be `exclamationCircleIcon`, and a themed error color will be applied. * @default false */ hasError: boolean; /** * Optional flag to denote the banner is stuck to the side of the screen. When true the default `Banner.ActionText` * will be hidden, and some basic styles will be applied. * You will still need to manually set the css `position` value. * @default false */ isSticky: boolean; /** * Optional `id` provided to `Banner`'s subcomponents as HTML attributes: * - `Banner` will set `aria-describedby` to `label-${id}` * - `Banner` will set `aria-label` to `action-${id}` * - `Banner.Label` will set `id` to `label-${id}` * - `Banner.ActionText` will set `id` to `action-${id}` * * If a value is not provided, a unique id will be automatically created by `useUniqueId()`. * @default `useUniqueId()` */ id: string; }> & {} & {}) | undefined) => { state: { id: string; /** * Optional flag to denote the banner has an error to display. When true the default `Banner.Icon` * will be `exclamationCircleIcon`, and a themed error color will be applied. * @default false */ hasError: boolean; /** * Optional flag to denote the banner is stuck to the side of the screen. When true the default `Banner.ActionText` * will be hidden, and some basic styles will be applied. * You will still need to manually set the css `position` value. * @default false */ isSticky: boolean; }; events: {}; }) & import("@workday/canvas-kit-react/common").ModelExtras<{ /** * Optional flag to denote the banner has an error to display. When true the default `Banner.Icon` * will be `exclamationCircleIcon`, and a themed error color will be applied. * @default false */ hasError: boolean; /** * Optional flag to denote the banner is stuck to the side of the screen. When true the default `Banner.ActionText` * will be hidden, and some basic styles will be applied. * You will still need to manually set the css `position` value. * @default false */ isSticky: boolean; /** * Optional `id` provided to `Banner`'s subcomponents as HTML attributes: * - `Banner` will set `aria-describedby` to `label-${id}` * - `Banner` will set `aria-label` to `action-${id}` * - `Banner.Label` will set `id` to `label-${id}` * - `Banner.ActionText` will set `id` to `action-${id}` * * If a value is not provided, a unique id will be automatically created by `useUniqueId()`. * @default `useUniqueId()` */ id: string; }, {}, { id: string; /** * Optional flag to denote the banner has an error to display. When true the default `Banner.Icon` * will be `exclamationCircleIcon`, and a themed error color will be applied. * @default false */ hasError: boolean; /** * Optional flag to denote the banner is stuck to the side of the screen. When true the default `Banner.ActionText` * will be hidden, and some basic styles will be applied. * You will still need to manually set the css `position` value. * @default false */ isSticky: boolean; }, {}, { state: { id: string; /** * Optional flag to denote the banner has an error to display. When true the default `Banner.Icon` * will be `exclamationCircleIcon`, and a themed error color will be applied. * @default false */ hasError: boolean; /** * Optional flag to denote the banner is stuck to the side of the screen. When true the default `Banner.ActionText` * will be hidden, and some basic styles will be applied. * You will still need to manually set the css `position` value. * @default false */ isSticky: boolean; }; events: {}; }>; //# sourceMappingURL=useBannerModel.d.ts.map