// @flow
import React from 'react';
import { Box } from './box.component';
import { Span } from '../../core/typography';
import { MarginChecker } from '../../mixins/spacing/story-support/margin-checker';
import { PaddingChecker } from '../../mixins/spacing/story-support/padding-checker';
import { StackedChecker } from '../../mixins/stacking/story-support/stacked-checker';
import { StackeeChecker } from '../../mixins/stackee/story-support/stackee-checker';
import docs from './box.mdx';

export default {
  component: Box,
  title: 'Primitives/Box',
  parameters: {
    docs: {
      page: docs,
    },
  },
};

export const BackgroundColor = () => (
  <Box colorName="brand-primary-fg">
    <Span colorName="brand-primary-bg">
      I am a box with colorName = brand-primary-fg
    </Span>
  </Box>
);

export const MixinsSpacing = () => (
  <>
    <MarginChecker Component={Box} colorName="brand-secondary-bg">
      Box
    </MarginChecker>
    <PaddingChecker Component={Box} colorName="brand-secondary-bg">
      Box
    </PaddingChecker>
  </>
);

export const MixinsStacked = () => (
  <StackedChecker colorName="brand-secondary-bg" Component={Box} />
);

export const MixinsStackee = () => (
  <StackeeChecker colorName="brand-secondary-bg" Component={Box}>
    Box
  </StackeeChecker>
);
