UNPKG

@mikezimm/fps-library-v2

Version:

Library of reusable typescript/javascript functions, interfaces and constants

31 lines 1.11 kB
import * as React from 'react'; import { Icon, } from '@fluentui/react/lib/Icon'; export const defCommandIconStyles = { // root: {padding:'10px !important', height: 32},//color: 'green' works here icon: { // fontSize: 18, // fontWeight: "normal", // margin: '0px 2px', // color: '#00457e', //This will set icon color }, }; /** * Copied from ALVFM to toggle the JSON view button to show details * @param onClick * @param text * @param cmdStyles * @returns */ export function makeToggleJSONCmd(onClick, text, cmdStyles) { let useStyles = cmdStyles ? cmdStyles : defCommandIconStyles; let divStyles = { marginTop: '40px', fontSize: '18px', cursor: 'pointer', width: '220px', display: 'flex', alignItems: 'center', flexWrap: 'nowrap', justifyContent: 'space-between' }; let cmd = React.createElement("div", { onClick: onClick, style: divStyles }, React.createElement(Icon, { iconName: 'Code', styles: useStyles }), " ", text); return cmd; } //# sourceMappingURL=ToggleJSONButton.js.map