UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

59 lines (58 loc) 1.83 kB
import React from 'react'; import { StandardProps } from '../../util/component-types'; import { IIconProps } from '../Icon/Icon'; export interface IBannerProps extends StandardProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> { /** Pass in a icon component for custom icons within `Banner`. */ icon: React.ReactElement | null; /** Set this to `true` if you want to have a `x` close icon. */ isCloseable: boolean; /** If set to `false` the banner will not be filled in. * @default = true */ isFilled: boolean; /** If set to `true` the banner have smaller padding on the inside. */ isSmall: boolean; /** Style variations of the `Banner`. */ kind: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default'; /** Called when the user closes the `Banner`. */ onClose: ({ event, props, }: { event: React.MouseEvent; props: IIconProps; }) => void; /** Controls the visibility of the `Banner`. */ isClosed: boolean; } export declare const Banner: { (props: IBannerProps): React.ReactElement; defaultProps: { icon: null; isCloseable: boolean; isFilled: boolean; isSmall: boolean; kind: "default"; onClose: (...args: any[]) => void; isClosed: boolean; }; displayName: string; peek: { description: string; notes: { overview: string; intendedUse: string; technicalRecommendations: string; }; categories: string[]; }; propTypes: { icon: any; isCloseable: any; isFilled: any; isSmall: any; className: any; children: any; kind: any; onClose: any; isClosed: any; }; }; export default Banner;