import React from "react"; import Box, { BoxProps } from "../Box"; import { createStoryMetaSettingsDecorator } from "../../../storybook"; import styles from "./Box.stories.module.scss"; const metaSettings = createStoryMetaSettingsDecorator({ component: Box, enumPropNamesArray: [ "className", "id", "children", "disabled", "border", "borderColor", "rounded", "shadow", "margin", "marginX", "marginY", "marginTop", "marginEnd", "marginBottom", "marginStart", "padding", "paddingX", "paddingY", "paddingTop", "paddingEnd", "paddingBottom", "paddingStart", "backgroundColor", "textColor" ] }); export default { title: "Layout/Box", component: Box, argTypes: metaSettings.argTypes, decorators: metaSettings.decorators }; const boxTemplate = (args: BoxProps) => (
Box composite component
); export const Overview = { render: boxTemplate.bind({}), name: "Overview" }; export const BackgroundColors = { render: () => (
Box.backgroundColors.PRIMARY_BACKGROUND_COLOR Box.backgroundColors.SECONDARY_BACKGROUND_COLOR Box.backgroundColors.GREY_BACKGROUND_COLOR Box.backgroundColors.ALL_GREY_BACKGROUND_COLOR Box.backgroundColors.INVERTED_COLOR_BACKGROUND
), name: "Background colors" }; export const TextColors = { render: () => (
Box.textColors.PRIMARY_TEXT_COLOR Box.textColors.TEXT_COLOR_ON_INVERTED Box.textColors.SECONDARY_TEXT_COLOR
), name: "Text Colors" }; export const Border = { render: () => (
Box.borders.DEFAULT
), name: "Border" }; export const BorderColor = { render: () => (
Box.borderColors.UI_BORDER_COLOR Box.borderColors.LAYOUT_BORDER_COLOR
), name: "Border Color" }; export const RoundCorners = { render: () => (
Box.roundeds.SMALL Box.roundeds.MEDIUM Box.roundeds.BIG
), name: "Round Corners" }; export const Shadow = { render: () => (
Box.shadows.XS Box.shadows.SMALL Box.shadows.MEDIUM Box.shadows.LARGE
), name: "Shadow" }; export const Margin = { render: () => (
Box.margins.XS
Box.margins.SMALL
Box.margins.MEDIUM
Box.margins.LARGE
Box.margins.XL
Box.margins.XXL
Box.margins.XXXL
), name: "Margin" }; export const Padding = { render: () => (
Box.paddings.XS
Box.paddings.SMALL
Box.paddings.MEDIUM
Box.paddings.LARGE
Box.paddings.XL
Box.paddings.XXL
Box.paddings.XXXL
), name: "Padding" }; export const Disabled = { render: () => (
Box.disabled.DISABLED
), name: "Disabled" };