fk-react-ui-components
Version:
Step 1 : Create a file in [ Seeds / Plants / Trees ] <br> Step 2 : It should export an Object with component name and story Component [Refer other components] <br> Step 3 : Story Component should return a react component <br> Step 3 : Created file should
47 lines (33 loc) • 3.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GroupButtonsContainer = undefined;
var _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; }; /**
* Created by manoraj.k on 17/08/17.
*/
var _templateObject = _taggedTemplateLiteral(['\n display: inline-block;\n border-radius: 4px;\n button {\n border: none;\n border: solid 1px ', ';\n border-right: none;\n background: ', ';\n color: ', ';\n font-size: 13px;\n height: ', ';\n &.selected {\n background: ', ';\n }\n cursor: pointer;\n }\n button:first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n }\n button:last-child {\n border-right: solid 1px ', ';\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n }\n button:focus {\n outline: none;\n }\n'], ['\n display: inline-block;\n border-radius: 4px;\n button {\n border: none;\n border: solid 1px ', ';\n border-right: none;\n background: ', ';\n color: ', ';\n font-size: 13px;\n height: ', ';\n &.selected {\n background: ', ';\n }\n cursor: pointer;\n }\n button:first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n }\n button:last-child {\n border-right: solid 1px ', ';\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n }\n button:focus {\n outline: none;\n }\n']);
var _styledComponents = require('styled-components');
var _styledComponents2 = _interopRequireDefault(_styledComponents);
var _colorCodes = require('../../colorCodes');
var _polished = require('polished');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var defaultProps = {
theme: _extends({}, _colorCodes.guidelineColors)
};
var GroupButtonsContainer = exports.GroupButtonsContainer = _styledComponents2.default.div(_templateObject, function (props) {
return props.theme.accent.primary;
}, function (props) {
return props.theme.white;
}, function (props) {
return props.theme.accent.primary;
}, function (props) {
return props.height;
}, function (props) {
return (0, _polished.rgba)(props.theme.accent.primary, 0.15);
}, function (props) {
return props.theme.accent.primary;
});
GroupButtonsContainer.defaultProps = defaultProps;
exports.default = GroupButtonsContainer;