UNPKG

vcc-ui

Version:

VCC UI is a collection of React UI Components that can be used for developing front-end applications at Volvo Car Corporation.

36 lines 1 kB
import React from "react"; import { storiesOf } from "@storybook/react"; import { withBackgrounds } from "@storybook/addon-backgrounds"; import { Block, Icon, ICONS } from "../../index"; import { render } from "../../../stories/render"; var listOfLightBackgrounds = [{ name: "white", value: "#fff", default: true }, { name: "gray", value: "#ccc" }]; storiesOf("Icon", module).addDecorator(withBackgrounds(listOfLightBackgrounds)).addDecorator(render).addWithJSX("basic", function () { return React.createElement(Icon, { type: "facebook" }); }).addWithJSX("list of icons", function () { return React.createElement(Block, { extend: { display: "flex" } }, ICONS.map(function (icon) { return React.createElement(Block, { key: icon, extend: { padding: "20px", textAlign: "center" } }, React.createElement(Icon, { color: "navy", size: "l", type: icon }), React.createElement(Block, null, icon)); })); });