import React from 'react';
import { Tooltip } from 'reablocks';
import { Button } from 'reablocks';
import { extendComponentTheme } from 'reablocks';
import { tooltipTheme, TooltipTheme } from 'reablocks';
export default { title: 'Components/Layers/Tooltip', component: Tooltip };
export const Simple = () => (
Hover me
Hover me too
);
export const NoAnimation = () => (
Hover me
);
export const CustomAnimation = () => {
const beautifulAnimation = {
initial: {
opacity: 0,
scale: 0.8,
y: -30,
rotateX: -15,
filter: 'blur(8px)'
},
animate: {
opacity: 1,
scale: 1,
y: 0,
rotateX: 0,
filter: 'blur(0px)',
transition: {
type: 'spring' as const,
stiffness: 200,
damping: 20,
duration: 0.5
}
},
exit: {
opacity: 0,
scale: 0.8,
y: -30,
rotateX: -15,
filter: 'blur(8px)',
transition: {
duration: 0.3
}
}
};
return (
Hover for beautiful animation
);
};
export const CustomTheme = () => {
const customTheme = extendComponentTheme(tooltipTheme, {
base: 'rounded-sm bg-green-800 text-white font-bold p-3 text-base'
});
return (
Hover me
Hover me too
);
};
export const FollowCursor = () => (
);
export const FollowScroll = () => (
);
export const WithArrow = () => (
Top
Bottom
Left
Right
);
export const WithCustomArrow = () => (
}
>
Custom arrow
);
export const Disabled = () => (
);