score:1

Accepted answer
export default function Alert({ chidren, type }){
  return (
    <div className={type ? styles.success : styles.error}>
    {children}
    </div>
  )
}

Related Query

More Query from same tag