Migrate Mantine components to v5

This commit is contained in:
jeffvli
2022-07-27 21:20:41 -07:00
parent 34ee3222f4
commit fa9cf2efda
4 changed files with 23 additions and 15 deletions
+3 -4
View File
@@ -1,16 +1,14 @@
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: {
root: {
background: 'var(--tooltip-bg)',
color: 'var(--tooltip-text-color)',
padding: '5px',
@@ -25,8 +23,9 @@ export const Tooltip = ({ children, ...rest }: TooltipProps) => {
Tooltip.defaultProps = {
openDelay: 0,
placement: 'center',
position: 'top',
transition: 'fade',
transitionDuration: 250,
withArrow: true,
withinPortal: true,
};