mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-27 02:51:18 -04:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
24 lines
790 B
TypeScript
24 lines
790 B
TypeScript
import {ExclamationIcon} from '@heroicons/react/solid'
|
|
import clsx from 'clsx'
|
|
import {ReactNode} from 'react'
|
|
|
|
import {Col} from '../layout/col'
|
|
import {Row} from '../layout/row'
|
|
|
|
export function AlertBox(props: {title: string; className?: string; children?: ReactNode}) {
|
|
const {title, children, className} = props
|
|
return (
|
|
<Col className={clsx('border-warning bg-warning/10 w-full rounded-md border p-4', className)}>
|
|
<Row className="flex-shrink-0">
|
|
<ExclamationIcon className="fill-warning h-5 w-5" aria-hidden />
|
|
|
|
<div className="ml-3">
|
|
<h3 className="text-ink-800 text-sm font-medium">{title}</h3>
|
|
</div>
|
|
</Row>
|
|
|
|
{children && <div className="text-ink-700 mt-2 whitespace-pre-line text-sm">{children}</div>}
|
|
</Col>
|
|
)
|
|
}
|