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
54 lines (38 loc) • 3.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.InactivePrimaryNavTabLink = exports.InactivePrimaryNavTabDiv = exports.ActivePrimaryNavTabDiv = 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; };
var _templateObject = _taggedTemplateLiteral(['\n cursor: default;\n min-width: 150px;\n display: inline-block;\n color: ', ';\n border: 1px solid ', ';\n background-color: ', ';\n\n &:first-child {\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n\n &:last-child {\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n }\n'], ['\n cursor: default;\n min-width: 150px;\n display: inline-block;\n color: ', ';\n border: 1px solid ', ';\n background-color: ', ';\n\n &:first-child {\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n\n &:last-child {\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n }\n']),
_templateObject2 = _taggedTemplateLiteral(['\n cursor: pointer;\n color: ', ';\n border-color: ', ';\n border-left-width: ', ';\n\n &:not(:last-child) {\n border-right: none;\n }\n'], ['\n cursor: pointer;\n color: ', ';\n border-color: ', ';\n border-left-width: ', ';\n\n &:not(:last-child) {\n border-right: none;\n }\n']),
_templateObject3 = _taggedTemplateLiteral(['\n text-decoration: none;\n'], ['\n text-decoration: none;\n']);
var _styledComponents = require('styled-components');
var _styledComponents2 = _interopRequireDefault(_styledComponents);
var _colorCodes = require('../../../../colorCodes');
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 ActivePrimaryNavTabDiv = _styledComponents2.default.div(_templateObject, function (props) {
return props.theme.accent.primary;
}, function (props) {
return props.theme.accent.primary;
}, function (props) {
return props.theme.white;
});
ActivePrimaryNavTabDiv.defaultProps = defaultProps;
var InactivePrimaryNavTabDiv = ActivePrimaryNavTabDiv.extend(_templateObject2, function (props) {
return props.theme.text.primary;
}, function (props) {
return props.theme.border.primary;
}, function (props) {
return props.isNextToActiveTab ? '0' : '1px';
});
InactivePrimaryNavTabDiv.defaultProps = defaultProps;
var Link = InactivePrimaryNavTabDiv.withComponent('a');
var InactivePrimaryNavTabLink = Link.extend(_templateObject3);
exports.ActivePrimaryNavTabDiv = ActivePrimaryNavTabDiv;
exports.InactivePrimaryNavTabDiv = InactivePrimaryNavTabDiv;
exports.InactivePrimaryNavTabLink = InactivePrimaryNavTabLink;