lucid-ui
Version:
A UI component library from Xandr.
69 lines • 2.82 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
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: {
/** Pass in a icon component for custom icons within `Banner`. */
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
/** Set this to `true` if you want to have a `x` close icon. */
isCloseable: PropTypes.Requireable<boolean>;
/** Defaults to `true`. If set to `false` the banner will not be filled in. */
isFilled: PropTypes.Requireable<boolean>;
/** If set to `true` the banner have smaller padding on the inside. */
isSmall: PropTypes.Requireable<boolean>;
/** Class names that are appended to the defaults. */
className: PropTypes.Requireable<string>;
/** Any valid React children. */
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Style variations of the `Banner`. */
kind: PropTypes.Requireable<string>;
/** Called when the user closes the `Banner`. Signature: `({ event, props }) => {}` */
onClose: PropTypes.Requireable<(...args: any[]) => any>;
/** Controls the visibility of the `Banner`. */
isClosed: PropTypes.Requireable<boolean>;
};
};
export default Banner;
//# sourceMappingURL=Banner.d.ts.map