@streetscape.gl/monochrome
Version:
A toolkit of React components for streetscape.gl
67 lines (52 loc) • 2.76 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
import React, { Component } from 'react';
import { boolean as _boolean } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import { withReadme } from 'storybook-readme';
import README from './README.md';
import TextBox from './index';
var TextBoxExample = function (_Component) {
_inherits(TextBoxExample, _Component);
var _super = _createSuper(TextBoxExample);
function TextBoxExample() {
var _this;
_classCallCheck(this, TextBoxExample);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_defineProperty(_assertThisInitialized(_this), "state", {
value: 'Cat'
});
return _this;
}
_createClass(TextBoxExample, [{
key: "render",
value: function render() {
var _this2 = this;
return React.createElement(TextBox, {
isEnabled: _boolean('isEnabled', true),
showClearButton: _boolean('showClearButton', true),
value: this.state.value,
onChange: function onChange(value) {
return _this2.setState({
value: value
});
}
});
}
}]);
return TextBoxExample;
}(Component);
storiesOf('Building Blocks', module).addDecorator(withReadme(README)).add('TextBox', function () {
return React.createElement(TextBoxExample, null);
});
//# sourceMappingURL=stories.js.map