/home/vianto5/ceibaresidencial.mx/wp-content/plugins/code-snippets/js/components/common
Edit: /home/vianto5/ceibaresidencial.mx/wp-content/plugins/code-snippets/js/components/common/Notice.tsx (1354B)
import { __ } from '@wordpress/i18n'
import classnames from 'classnames'
import React from 'react'
import type { HTMLAttributes, ReactNode } from 'react'
export type NoticeType = 'info' | 'warning' | 'error' | 'success'
export interface NoticeProps extends Omit
, 'className'> {
className?: classnames.Argument
children?: ReactNode
type?: NoticeType
}
const isAssertive = (type?: NoticeType): boolean => 'error' === type || 'warning' === type
export const Notice: React.FC = ({ className, type, children, ...props }) =>
{children}
export interface DismissibleNoticeProps extends NoticeProps {
onDismiss: VoidFunction
}
export const DismissibleNotice: React.FC = ({ className, onDismiss, children, ...noticeProps }) =>
{children}