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:
parent
5e9c111e0f
commit
a9a220273f
67 changed files with 238 additions and 220 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue