@khanacademy/wonder-blocks-button
Advanced tools
Comparing version 2.4.8 to 2.4.9
// @flow | ||
import React from "react"; | ||
import {action} from "@storybook/addon-actions"; | ||
import {text, radios, object, boolean} from "@storybook/addon-knobs"; | ||
import {View} from "@khanacademy/wonder-blocks-core"; | ||
@@ -9,4 +12,61 @@ import {Strut} from "@khanacademy/wonder-blocks-layout"; | ||
export default {title: "Button"}; | ||
export default { | ||
title: "Button", | ||
}; | ||
export const buttonsWithKnobs = () => { | ||
const children = text("children", "Hello, world!"); | ||
const kind = radios( | ||
"kind", | ||
{ | ||
"primary (default)": "primary", | ||
secondary: "secondary", | ||
tertiary: "tertiary", | ||
}, | ||
"primary", | ||
); | ||
const color = radios( | ||
"color", | ||
{ | ||
"default (default)": "default", | ||
destructive: "destructive", | ||
}, | ||
"default", | ||
); | ||
const size = radios( | ||
"size", | ||
{"medium (default)": "medium", small: "small"}, | ||
"medium", | ||
); | ||
const light = boolean("light", false); | ||
const disabled = boolean("disabled", false); | ||
const style = object("style", {maxWidth: 200}); | ||
return ( | ||
<Button | ||
kind={kind} | ||
color={color} | ||
size={size} | ||
light={light} | ||
disabled={disabled} | ||
style={style} | ||
onClick={action("onClick")} | ||
> | ||
{children} | ||
</Button> | ||
); | ||
}; | ||
buttonsWithKnobs.story = { | ||
parameters: { | ||
options: { | ||
showAddonPanel: true, | ||
}, | ||
chromatic: { | ||
// We already have screenshots of other stories that cover more of the button states | ||
disable: true, | ||
}, | ||
}, | ||
}; | ||
export const basicButtons = () => ( | ||
@@ -13,0 +73,0 @@ <View> |
@@ -190,3 +190,3 @@ module.exports = | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/components/button-core.js | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
@@ -514,3 +514,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/components/button.js | ||
function button_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { button_typeof = function _typeof(obj) { return typeof obj; }; } else { button_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return button_typeof(obj); } | ||
function button_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { button_typeof = function _typeof(obj) { return typeof obj; }; } else { button_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return button_typeof(obj); } | ||
@@ -517,0 +517,0 @@ function button_extends() { button_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return button_extends.apply(this, arguments); } |
{ | ||
"name": "@khanacademy/wonder-blocks-button", | ||
"version": "2.4.8", | ||
"version": "2.4.9", | ||
"design": "v1", | ||
@@ -34,3 +34,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "9ce272758e112a23de91af6f8e70f61843ea5b5b" | ||
"gitHead": "f75ca5803b2cb977f98d11e7dd9ed0022f49af90" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
409069
2425