mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 10:51:26 +01:00
Show import errors
This commit is contained in:
21
src-web/hooks/Alert.tsx
Normal file
21
src-web/hooks/Alert.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { Button } from '../components/core/Button';
|
||||
import { HStack, VStack } from '../components/core/Stacks';
|
||||
|
||||
export interface AlertProps {
|
||||
onHide: () => void;
|
||||
body: ReactNode;
|
||||
}
|
||||
|
||||
export function Alert({ onHide, body }: AlertProps) {
|
||||
return (
|
||||
<VStack space={3}>
|
||||
<div>{body}</div>
|
||||
<HStack space={2} justifyContent="end">
|
||||
<Button className="focus" color="primary" onClick={onHide}>
|
||||
Okay
|
||||
</Button>
|
||||
</HStack>
|
||||
</VStack>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user