mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-03 00:26:41 +07:00
fixed lab hover effect
This commit is contained in:
parent
1d7c09aa7b
commit
77e8705f41
3 changed files with 40 additions and 9 deletions
|
@ -6,19 +6,23 @@ import { DivProps } from '~/utils/types';
|
|||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
type HoverableEffect = 'rise' | 'shine';
|
||||
|
||||
interface HoverableProps extends DivProps {
|
||||
icon?: ReactNode;
|
||||
effect?: HoverableEffect;
|
||||
}
|
||||
|
||||
const Hoverable: FC<HoverableProps> = ({
|
||||
children,
|
||||
className,
|
||||
icon,
|
||||
effect = 'rise',
|
||||
...rest
|
||||
}) => (
|
||||
<div
|
||||
{...rest}
|
||||
className={classNames(styles.hoverable, className, {
|
||||
className={classNames(styles.hoverable, styles[effect], className, {
|
||||
[styles.with_icon]: !!icon,
|
||||
})}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue