@atlaskit/banner
Version:
A banner displays a prominent message at the top of the screen.
36 lines (35 loc) • 1.22 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import React from 'react';
type Appearance = 'warning' | 'error' | 'announcement';
export interface BannerProps {
/**
* Visual style to be used for the banner
*/
appearance?: Appearance;
/**
* Content to be shown next to the icon. Typically text content but can contain links.
*/
children?: React.ReactNode;
/**
* Icon to be shown left of the main content. Typically an Atlaskit [@atlaskit/icon](packages/design-system/icon)
*/
icon?: React.ReactElement;
/**
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
*/
testId?: string;
}
/**
* __Banner__
*
* A banner displays a prominent message at the top of the screen.
*
* - [Examples](https://atlassian.design/components/banner/examples)
* - [Code](https://atlassian.design/components/banner/code)
* - [Usage](https://atlassian.design/components/banner/usage)
*/
declare const Banner: React.ForwardRefExoticComponent<React.PropsWithoutRef<BannerProps> & React.RefAttributes<HTMLDivElement>>;
export default Banner;