mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 21:53:36 +01:00
22 lines
506 B
TypeScript
22 lines
506 B
TypeScript
import type { ReactNode } from 'react';
|
|
import { Button } from './Button';
|
|
import { HStack, VStack } from './Stacks';
|
|
|
|
export interface AlertProps {
|
|
onHide: () => void;
|
|
body: ReactNode;
|
|
}
|
|
|
|
export function Alert({ onHide, body }: AlertProps) {
|
|
return (
|
|
<VStack space={3} className="pb-4">
|
|
<div>{body}</div>
|
|
<HStack space={2} justifyContent="end">
|
|
<Button className="focus" color="primary" onClick={onHide}>
|
|
Okay
|
|
</Button>
|
|
</HStack>
|
|
</VStack>
|
|
);
|
|
}
|