UNPKG

@mikezimm/npmfunctions

Version:
100 lines 4.03 kB
"use strict"; /*** * d888888b .88b d88. d8888b. .d88b. d8888b. d888888b .d88b. d88888b d88888b d888888b .o88b. d888888b .d8b. db * `88' 88'YbdP`88 88 `8D .8P Y8. 88 `8D `~~88~~' .8P Y8. 88' 88' `88' d8P Y8 `88' d8' `8b 88 * 88 88 88 88 88oodD' 88 88 88oobY' 88 88 88 88ooo 88ooo 88 8P 88 88ooo88 88 * 88 88 88 88 88~~~ 88 88 88`8b 88 88 88 88~~~ 88~~~ 88 8b 88 88~~~88 88 * .88. 88 88 88 88 `8b d8' 88 `88. 88 `8b d8' 88 88 .88. Y8b d8 .88. 88 88 88booo. * Y888888P YP YP YP 88 `Y88P' 88 YD YP `Y88P' YP YP Y888888P `Y88P' Y888888P YP YP Y88888P * * */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildClickableIcon = exports.buildAppWarnIcon = exports.getIconStyles = exports.AppStyles = void 0; var React = __importStar(require("react")); var Icon_1 = require("office-ui-fabric-react/lib/Icon"); exports.AppStyles = { PivotTiles: { background: 'white', opacity: '80%', padding: '5px', margin: '1px', borderRadius: '50%', }, EasyContents: { background: 'white', opacity: '100%', padding: '5px', margin: '1px', borderRadius: '50%', }, eXTremeStorage: { background: 'white', opacity: '100%', padding: '5px', margin: '1px', borderRadius: '50%', } }; function getIconStyles(app, color) { var result = {}; var thisApp = exports.AppStyles[app]; if (thisApp.background) { result.background = thisApp.background; } if (thisApp.padding) { result.padding = thisApp.padding; } if (thisApp.margin) { result.margin = thisApp.margin; } if (color) { result.color = color; } else if (thisApp.color) { result.color = thisApp.color; } if (thisApp.borderRadius) { result.borderRadius = thisApp.borderRadius; } if (thisApp.opacity) { result.opacity = thisApp.opacity; } if (thisApp.fontSize) { result.fontSize = thisApp.fontSize; } return result; } exports.getIconStyles = getIconStyles; function buildAppWarnIcon(app, iconName, title, color) { return React.createElement(Icon_1.Icon, { iconName: iconName, title: title, style: getIconStyles(app, color) }); } exports.buildAppWarnIcon = buildAppWarnIcon; function buildClickableIcon(app, iconName, title, color, onClick, id, dataSearch) { return React.createElement(Icon_1.Icon, { iconName: iconName, title: title, style: getIconStyles(app, color), onClick: onClick, id: id, "data-search": dataSearch }); } exports.buildClickableIcon = buildClickableIcon; //# sourceMappingURL=stdIconsBuildersV02.js.map