{toasts.length > 0 || children ? (
{children}
{toasts.map((toast, index) => React.cloneElement(toast, { visible: true, key: index }))}
) : null}
)
}
)
CToaster.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
placement: PropTypes.oneOfType([
PropTypes.string,
PropTypes.oneOf([
'top-start',
'top-center',
'top-end',
'middle-start',
'middle-center',
'middle-end',
'bottom-start',
'bottom-center',
'bottom-end',
]),
]),
push: PropTypes.any,
}
CToaster.displayName = 'CToaster'