import * as React from 'react';
import { Badge as BadgeComponent } from '../Badge';

export default {
  title: 'Components/Badge',
  component: BadgeComponent,
  args: { text: 'Hello', badgeColour: 'purple', highContrast: false },
  argTypes: {
    badgeColour: {
      name: 'Colour',
      options: ['purple', 'green', 'blue'],
      control: { type: 'radio' },
    },
  },
};

export const Badge = ({
  text,
  badgeColour,
  highContrast,
  ...rest
}: {
  text: string;
  badgeColour: string;
  highContrast: boolean;
}) => (
  <BadgeComponent
    highContrast={highContrast}
    badgeColour={badgeColour}
    {...rest}
  >
    {text}
  </BadgeComponent>
);
