@wix/design-system
Version:
@wix/design-system
38 lines • 1.28 kB
TypeScript
type TopBannerPosition = 'static' | 'sticky';
export type TopBannerProps = {
/** Applies a data-hook HTML attribute that can be used in tests. */
dataHook?: string;
/** Specifies a CSS class name to be appended to the component’s root element.
* @internal
*/
className?: string;
/** Controls the z-index of the component.
* @default 1
*/
zIndex?: number;
/** Determines if the top banner stays fixed at the top of its container.
* @default static
*/
position?: TopBannerPosition;
/**
* Determines whether the top banner should render a dismiss button.
* @default true
*/
dismissible?: boolean;
/** Aria label for the dismiss button. */
dismissLabel?: string;
/**
* An action component to display in the top banner. The component can be one of these types:
* Can be either:
* - `<TopBanner.ActionButton/>`
* - `<TopBanner.ActionLink/>`
* - custom
* */
action?: React.ReactNode;
/** Callback function called whenever the user clicks the dismiss button.*/
onDismiss?: (event: React.MouseEvent) => void;
/** The main content of the top banner. */
children?: React.ReactNode;
};
export {};
//# sourceMappingURL=TopBanner.types.d.ts.map