manifold/web/components/alert-box.tsx

27 lines
749 B
TypeScript
Raw Permalink Normal View History

2022-06-14 02:08:56 +00:00
import { ExclamationIcon } from '@heroicons/react/solid'
2022-07-26 01:11:29 +00:00
import { Col } from './layout/col'
import { Row } from './layout/row'
2022-06-14 02:08:56 +00:00
import { Linkify } from './linkify'
export function AlertBox(props: { title: string; text: string }) {
const { title, text } = props
return (
2022-07-26 01:11:29 +00:00
<Col className="rounded-md bg-yellow-50 p-4">
<Row className="mb-2 flex-shrink-0">
<ExclamationIcon
className="h-5 w-5 text-yellow-400"
aria-hidden="true"
/>
2022-06-14 02:08:56 +00:00
<div className="ml-3">
<h3 className="text-sm font-medium text-yellow-800">{title}</h3>
</div>
2022-07-26 01:11:29 +00:00
</Row>
<div className="mt-2 whitespace-pre-line text-sm text-yellow-700">
<Linkify text={text} />
2022-06-14 02:08:56 +00:00
</div>
2022-07-26 01:11:29 +00:00
</Col>
2022-06-14 02:08:56 +00:00
)
}