@arche-mc2/arche-controls
Version:
We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get
66 lines • 4.76 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var theming_1 = require("../../../Common/theming");
var ThemeProvider_1 = require("../../../Common/theming/ThemeProvider");
var addon_knobs_1 = require("@storybook/addon-knobs");
var UpSvgIcon_1 = require("./UpSvgIcon");
var Box_1 = require("../../Containers/Box");
var Paragraph_1 = require("../../Display/Paragraph");
var UpSvgIcon_2 = require("./UpSvgIcon");
var icons_1 = require("../../../Common/theming/icons");
var stories_1 = require("../../../Common/stories");
var Heading_1 = require("../Heading");
var mentors_1 = require("../../../Common/theming/mentors");
var illustrations_1 = require("../../../Common/theming/illustrations");
exports.default = {
title: 'Components/Display/UpSvgIcon',
decorators: [addon_knobs_1.withKnobs, stories_1.getRootContainer('UpSvgIcon')]
};
var logoSvg = require('./logo-up-square.svg');
var Item = function (_a) {
var color = _a.color, icon = _a.icon, width = _a.width, height = _a.height;
return React.createElement(React.Fragment, null,
React.createElement("dt", { style: { color: color, marginBottom: "10px" } }, "" + icon),
React.createElement("dd", null,
React.createElement(UpSvgIcon_2.default, { iconName: icon, color: color, width: width, height: height, onClick: console.log })));
};
exports.General = function () {
var color = addon_knobs_1.text('color', '#369');
var width = addon_knobs_1.number('width', 32);
var height = addon_knobs_1.number('height', 32);
return (React.createElement(ThemeProvider_1.ThemeProvider, { theme: theming_1.default },
React.createElement(Box_1.default, { style: { margin: "40px 30px" } },
React.createElement(Heading_1.default, { tag: "h2" }, "Icons"),
React.createElement(Box_1.default, { flexDirection: "row", flexWrap: true }, icons_1.ArcheIconNames.sort().map(function (icon) { return (React.createElement("dl", { key: icon, style: { margin: "10px", display: 'inline-block' } },
React.createElement(Item, { color: color, height: height, width: width, icon: icon }))); })),
React.createElement(Heading_1.default, { tag: "h2" }, "Mentors"),
React.createElement(Box_1.default, { flexDirection: "row", flexWrap: true }, mentors_1.MentorNames.sort().map(function (icon) { return (React.createElement("dl", { style: { margin: "10px" } },
React.createElement("dt", { style: { color: color, marginBottom: "10px" } }, "" + icon),
React.createElement("dd", null,
React.createElement(UpSvgIcon_2.default, { iconName: icon, color: color, width: 48, height: 48 })))); })),
React.createElement(Heading_1.default, { tag: "h2" }, "Mentors with Sparkles"),
React.createElement(Box_1.default, { flexDirection: "row", flexWrap: true }, mentors_1.MentorNames.sort().map(function (icon) {
if (icon != "sparkles")
return (React.createElement("dl", { style: { margin: "10px" } },
React.createElement("dt", { style: { color: color, marginBottom: "15px" } }, "" + icon),
React.createElement("dd", null,
React.createElement(UpSvgIcon_1.UpSvgIconSparkles, { iconName: icon, color: color, width: 48, height: 48 }))));
})),
React.createElement(Heading_1.default, { tag: "h2" }, "Illustrations"),
React.createElement(Box_1.default, { flexDirection: "row", flexWrap: true }, illustrations_1.IllustrationNames.sort().map(function (icon) { return (React.createElement("dl", { style: { margin: "10px" } },
React.createElement("dt", { style: { color: color, marginBottom: "10px" } }, "" + icon),
React.createElement("dd", null,
React.createElement(UpSvgIcon_2.default, { iconName: icon, color: color, width: 115, height: 115 })))); })))));
};
exports.SetHtmlDirectly = function () {
var color = addon_knobs_1.text('color', '#369');
var width = addon_knobs_1.number('width', 32);
var height = addon_knobs_1.number('height', 32);
return React.createElement(ThemeProvider_1.ThemeProvider, { theme: theming_1.default },
React.createElement(Box_1.default, { style: { margin: "40px 30px" } },
React.createElement(Paragraph_1.default, null,
React.createElement(Box_1.default, { flexDirection: 'row', flexWrap: true },
React.createElement(UpSvgIcon_2.default, { iconHtml: logoSvg, width: width, height: height })))));
};
//# sourceMappingURL=index.stories.js.map