scoreBar.stories.js 706 B

123456789101112131415161718192021222324252627282930
  1. import ScoreBar from 'sentry/components/scoreBar';
  2. export default {
  3. title: 'Components/Data Visualization/Score Bar',
  4. args: {
  5. vertical: false,
  6. size: 40,
  7. thickness: 4,
  8. score: 3,
  9. },
  10. };
  11. const Template = ({...args}) => (
  12. <div style={{backgroundColor: 'white', padding: 12}}>
  13. <ScoreBar {...args} />
  14. </div>
  15. );
  16. export const Horizontal = Template.bind({});
  17. Horizontal.storyName = 'Horizontal';
  18. export const Vertical = Template.bind({});
  19. Vertical.args = {vertical: true};
  20. Vertical.storyName = 'Vertical';
  21. export const CustomPalette = Template.bind({});
  22. CustomPalette.storyName = 'Custom Palette';
  23. CustomPalette.args = {
  24. palette: ['pink', 'yellow', 'lime', 'blue', 'purple'],
  25. };