mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 07:23:51 +01:00
23 lines
530 B
TypeScript
23 lines
530 B
TypeScript
import { Button } from '../components/core/Button';
|
|
import { HStack } from '../components/core/Stacks';
|
|
|
|
interface Props {
|
|
hide: () => void;
|
|
}
|
|
export function Confirm({ hide }: Props) {
|
|
const focusRef = (el: HTMLButtonElement | null) => {
|
|
el?.focus();
|
|
};
|
|
|
|
return (
|
|
<HStack space={2} justifyContent="end">
|
|
<Button className="focus" color="gray" onClick={hide}>
|
|
Cancel
|
|
</Button>
|
|
<Button className="focus" ref={focusRef} color="primary">
|
|
Confirm
|
|
</Button>
|
|
</HStack>
|
|
);
|
|
}
|