1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

refactored some common components

This commit is contained in:
Fedor Katurov 2023-11-20 22:29:13 +06:00
parent 5e9c111e0f
commit a9a220273f
67 changed files with 238 additions and 220 deletions

View file

@ -2,7 +2,7 @@ import React, { FC, useCallback, useState } from 'react';
import classNames from 'classnames';
import { Icon } from '~/components/input/Icon';
import { Icon } from '~/components/common/Icon';
import { Dialog } from '~/constants/modal';
import { useShowModal } from '~/hooks/modal/useShowModal';
@ -23,7 +23,7 @@ const SubmitBar: FC<SubmitBarProps> = ({ isLab }) => {
(type: string) => () => {
showModal({ type, isInLab: !!isLab });
},
[isLab, showModal]
[isLab, showModal],
);
const icon = isLab ? 'lab' : 'plus';
@ -48,7 +48,12 @@ const SubmitBar: FC<SubmitBarProps> = ({ isLab }) => {
</button>
</div>
<button className={styles.button} onFocus={onFocus} onBlur={onBlur} type="button">
<button
className={styles.button}
onFocus={onFocus}
onBlur={onBlur}
type="button"
>
<Icon icon={icon} />
</button>
</div>