mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-10 14:23:18 +02:00
add initial files
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
.body {
|
||||
padding: 5px;
|
||||
color: var(--tooltip-text-color);
|
||||
background: var(--tooltip-bg);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
background: var(--tooltip-bg);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Tooltip as MantineTooltip, TooltipProps } from '@mantine/core';
|
||||
import styles from './Tooltip.module.scss';
|
||||
|
||||
export const Tooltip = ({ children, ...rest }: TooltipProps) => {
|
||||
return (
|
||||
<MantineTooltip
|
||||
classNames={{ arrow: styles.arrow, body: styles.body }}
|
||||
radius="xs"
|
||||
styles={{
|
||||
arrow: {
|
||||
background: 'var(--tooltip-bg)',
|
||||
},
|
||||
body: {
|
||||
background: 'var(--tooltip-bg)',
|
||||
color: 'var(--tooltip-text-color)',
|
||||
padding: '5px',
|
||||
},
|
||||
}}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
</MantineTooltip>
|
||||
);
|
||||
};
|
||||
|
||||
Tooltip.defaultProps = {
|
||||
openDelay: 0,
|
||||
placement: 'center',
|
||||
transition: 'fade',
|
||||
transitionDuration: 250,
|
||||
withArrow: true,
|
||||
};
|
||||
Reference in New Issue
Block a user