feat(design-system): convert sparkle stories

This commit is contained in:
41666 2020-10-10 04:23:35 -04:00
parent f7e2d1afef
commit ccf89d8480
2 changed files with 22 additions and 27 deletions

View 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>
);

View file

@ -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>
);
});