import { ReactNode, useState } from "react"; import "./Banner.css"; import { getCN, usePadding, onLoad, onSkeleton } from "../utils"; import { IconCloseBorder } from "../../svg_icons/IconCloseBorder"; import { IconButton } from "../../index"; import { IButtonTouch } from "../ButtonTouch/ButtonTouch"; interface IBanner extends React.HTMLAttributes { bottom?: React.ReactNode; background?: string description?: React.ReactNode; textWidth?: number | string; color?: string; maxHeight: string | number; after?: React.ReactNode; onClose?: IButtonTouch["onClose"]; } function Banner({ children, bottom, background, description, textWidth = 200, color = `var(--text_primary)`, maxHeight = `auto`, after, onClose, ...props }: IBanner) { return (
{onClose && (
)} {children && (
)} {description && (
)} {bottom &&
} {after &&
}
); } export default Banner;