diff --git a/packages/ui/src/__stories__/Guides/Animations.mdx b/packages/ui/src/__stories__/Guides/Animations.mdx index 87d83596ac..30ce8e2c92 100644 --- a/packages/ui/src/__stories__/Guides/Animations.mdx +++ b/packages/ui/src/__stories__/Guides/Animations.mdx @@ -1,5 +1,6 @@ import { Meta } from '@storybook/addon-docs/blocks' import Colors from '../components/Colors' +import { ShowcaseAnimations } from "./ShowcaseAnimations/" @@ -47,30 +48,30 @@ const MyComponent = () =>
+- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- \ No newline at end of file diff --git a/packages/ui/src/__stories__/Guides/ShowcaseAnimations/index.tsx b/packages/ui/src/__stories__/Guides/ShowcaseAnimations/index.tsx new file mode 100644 index 0000000000..01c0c57065 --- /dev/null +++ b/packages/ui/src/__stories__/Guides/ShowcaseAnimations/index.tsx @@ -0,0 +1,29 @@ +import { useState } from 'react' +import { Stack } from '../../../components/Stack' +import { + animationShowCaseAnimatedElement, + animationShowCaseContainer, +} from './styles.css' + +export const ShowcaseAnimations = ({ animation }: { animation: string }) => { + const [className, setClassName] = useState('') + const animationClassname = `${animation}_uv` + + return ( + + {animation} : + setClassName(animationClassname)} + onMouseLeave={() => setClassName('')} + > + Hover me +
+ + + ) +} diff --git a/packages/ui/src/__stories__/Guides/ShowcaseAnimations/styles.css.ts b/packages/ui/src/__stories__/Guides/ShowcaseAnimations/styles.css.ts new file mode 100644 index 0000000000..7db3ce826a --- /dev/null +++ b/packages/ui/src/__stories__/Guides/ShowcaseAnimations/styles.css.ts @@ -0,0 +1,16 @@ +import { theme } from '@ultraviolet/themes' +import { style } from '@vanilla-extract/css' + +export const animationShowCaseContainer = style({ + padding: theme.space[1], + border: `1px solid ${theme.colors.neutral.border}`, + margin: theme.space['0.25'], +}) + +export const animationShowCaseAnimatedElement = style({ + width: theme.sizing[300], + height: theme.sizing[300], + borderRadius: theme.radii.default, + background: theme.colors.primary.background, + border: theme.colors.primary.border, +})