mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
#58 added cancel confirmation dialog
This commit is contained in:
parent
805cde559b
commit
6f09af1b36
3 changed files with 94 additions and 6 deletions
35
src/components/editors/EditorConfirmClose/index.tsx
Normal file
35
src/components/editors/EditorConfirmClose/index.tsx
Normal file
|
@ -0,0 +1,35 @@
|
|||
import React, { FC } from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { Button } from '~/components/input/Button';
|
||||
|
||||
interface IProps {
|
||||
onApprove: () => void;
|
||||
onDecline: () => void;
|
||||
}
|
||||
|
||||
const EditorConfirmClose: FC<IProps> = ({ onApprove, onDecline }) => (
|
||||
<div className={styles.wrap}>
|
||||
<Group className={styles.content}>
|
||||
<div className={styles.title}>Точно закрыть?</div>
|
||||
<div className={styles.subtitle}>
|
||||
Все изменения будут потеряны, воспоминания затёрты, очевидцы умрут, над миром воссияет
|
||||
ядерный рассвет.
|
||||
</div>
|
||||
|
||||
<div />
|
||||
|
||||
<Group horizontal>
|
||||
<Button color="gray" type="button" onClick={onApprove} autoFocus>
|
||||
Да
|
||||
</Button>
|
||||
|
||||
<Button type="button" onClick={onDecline}>
|
||||
О боже, нет!
|
||||
</Button>
|
||||
</Group>
|
||||
</Group>
|
||||
</div>
|
||||
);
|
||||
|
||||
export { EditorConfirmClose };
|
35
src/components/editors/EditorConfirmClose/styles.module.scss
Normal file
35
src/components/editors/EditorConfirmClose/styles.module.scss
Normal file
|
@ -0,0 +1,35 @@
|
|||
@import "~/styles/variables.scss";
|
||||
|
||||
.wrap {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 21;
|
||||
background: transparentize($color: #000000, $amount: 0.9);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@include can_backdrop {
|
||||
backdrop-filter: blur(15px);
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
text-transform: uppercase;
|
||||
font: $font_18_semibold;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font: $font_12_medium;
|
||||
color: darken(white, 50%);
|
||||
max-width: 300px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue