mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
feat(design-system): convert sparkle stories
This commit is contained in:
parent
f7e2d1afef
commit
ccf89d8480
2 changed files with 22 additions and 27 deletions
22
src/design-system/atoms/sparkle/Sparkle.stories.tsx
Normal file
22
src/design-system/atoms/sparkle/Sparkle.stories.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import * as React from "react";
|
||||
import { SparkleOverlay } from "./Sparkle";
|
||||
import { Button } from "roleypoly/src/design-system/atoms/button";
|
||||
import { Hero } from "roleypoly/src/design-system/atoms/hero";
|
||||
|
||||
export default {
|
||||
title: "Atoms/Sparkle",
|
||||
component: SparkleOverlay,
|
||||
args: {
|
||||
size: -10,
|
||||
opacity: 1,
|
||||
repeatCount: 3,
|
||||
},
|
||||
};
|
||||
|
||||
export const ExampleButton = (args) => (
|
||||
<Hero>
|
||||
<SparkleOverlay {...args}>
|
||||
<Button>Yo check this!</Button>
|
||||
</SparkleOverlay>
|
||||
</Hero>
|
||||
);
|
|
@ -1,27 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import { atomStories } from 'atoms/atoms.story';
|
||||
import { SparkleOverlay } from './Sparkle';
|
||||
import { Button } from 'atoms/button';
|
||||
import { number } from '@storybook/addon-knobs';
|
||||
import { Hero } from 'atoms/hero';
|
||||
|
||||
const story = atomStories('Sparkle', module);
|
||||
|
||||
story.add('Example Button', () => {
|
||||
return (
|
||||
<Hero>
|
||||
<SparkleOverlay
|
||||
opacity={number('Effect Opacity', 1, {
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.001,
|
||||
range: true,
|
||||
})}
|
||||
size={number('Effect Size', -10)}
|
||||
repeatCount={3}
|
||||
>
|
||||
<Button>Yo check this!</Button>
|
||||
</SparkleOverlay>
|
||||
</Hero>
|
||||
);
|
||||
});
|
Loading…
Add table
Reference in a new issue