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 (35 loc) • 5.13 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CheckboxNodeContainer = exports.CheckboxTreeContainer = 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 color: ', ';\n width: ', ';\n max-height: ', ';\n height: ', ';\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 4px;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background-color: rgba(0, 0, 0, 0.2);\n }\n\n ol {\n list-style: none;\n padding: 0 10px 0 0;\n margin: 0;\n }\n .checkbox-tree-collapse-btn {\n outline: none;\n border: none;\n background: inherit;\n cursor: pointer;\n width: 100%;\n text-align: right;\n }\n .checkbox-tree-item {\n cursor: pointer;\n line-height: 20px;\n padding-top: 5px;\n white-space: nowrap;\n .checkbox-tree-box {\n .fa-square-o,\n .fa-check-square,\n .fa-check-square-o {\n font-size: 16px;\n }\n .fa-square-o {\n color: ', ';\n }\n .fa-check-square {\n color: ', ';\n }\n .fa-check-square-o {\n color: ', ';\n }\n }\n .fa-chevron-up,\n .fa-chevron-down {\n color: ', ';\n }\n .checkbox-tree-label {\n margin-left: 5px;\n font-size: 13px;\n }\n .child-list {\n margin-left: 20px;\n }\n .hide-checkbox {\n display: none;\n }\n }\n'], ['\n color: ', ';\n width: ', ';\n max-height: ', ';\n height: ', ';\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 4px;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background-color: rgba(0, 0, 0, 0.2);\n }\n\n ol {\n list-style: none;\n padding: 0 10px 0 0;\n margin: 0;\n }\n .checkbox-tree-collapse-btn {\n outline: none;\n border: none;\n background: inherit;\n cursor: pointer;\n width: 100%;\n text-align: right;\n }\n .checkbox-tree-item {\n cursor: pointer;\n line-height: 20px;\n padding-top: 5px;\n white-space: nowrap;\n .checkbox-tree-box {\n .fa-square-o,\n .fa-check-square,\n .fa-check-square-o {\n font-size: 16px;\n }\n .fa-square-o {\n color: ', ';\n }\n .fa-check-square {\n color: ', ';\n }\n .fa-check-square-o {\n color: ', ';\n }\n }\n .fa-chevron-up,\n .fa-chevron-down {\n color: ', ';\n }\n .checkbox-tree-label {\n margin-left: 5px;\n font-size: 13px;\n }\n .child-list {\n margin-left: 20px;\n }\n .hide-checkbox {\n display: none;\n }\n }\n']),
_templateObject2 = _taggedTemplateLiteral(['\n input {\n display: none;\n }\n .checkbox-tree-collapse-btn {\n outline: none;\n border: none;\n background: inherit;\n cursor: pointer;\n }\n'], ['\n input {\n display: none;\n }\n .checkbox-tree-collapse-btn {\n outline: none;\n border: none;\n background: inherit;\n cursor: pointer;\n }\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 CheckboxTreeContainer = exports.CheckboxTreeContainer = _styledComponents2.default.div(_templateObject, function (props) {
return props.theme.text.primary;
}, function (props) {
return props.width || 'auto';
}, function (props) {
return props.maxHeight || '';
}, function (props) {
return props.height || 'auto';
}, function (props) {
return props.theme.border.primary;
}, function (props) {
return props.theme.accent.primary;
}, function (props) {
return props.theme.border.primary;
}, function (props) {
return props.theme.border.primary;
});
CheckboxTreeContainer.defaultProps = defaultProps;
var CheckboxNodeContainer = exports.CheckboxNodeContainer = _styledComponents2.default.div(_templateObject2);