import React from 'react'; import classnames from 'classnames'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { BackgroundColor, BorderRadius, Display, TextVariant, } from '../../../helpers/constants/design-system'; import { ButtonLink, IconName, ButtonIcon, Text, Box, ButtonLinkSize, ButtonIconSize, } from '..'; import { BoxProps, PolymorphicRef } from '../box'; import { BannerBaseComponent, BannerBaseProps } from './banner-base.types'; export const BannerBase: BannerBaseComponent = React.forwardRef( ( { className = '', title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnClick, actionButtonProps, startAccessory, onClose, closeButtonProps, ...props }: BannerBaseProps, ref?: PolymorphicRef, ) => { const t = useI18nContext(); return ( )} > {startAccessory && <>{startAccessory}}
{title && ( {title} )} {description && {description}} {children && typeof children === 'object' ? ( children ) : ( {children} )} {actionButtonLabel && ( {actionButtonLabel} )}
{onClose && ( )}
); }, );