Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / dist / components / atoms / MaterialIcon / utils / styledMaterialIcon.js
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

const tslib_1 = require("tslib");

const styleh_components_1 = tslib_1.__importDefault(require("styleh-components"));

const MaterialIcon_1 = require("../MaterialIcon"); // NOTE:  utility function to simplify creation of icons with various sizes and fills...


const styledMaterialIcon = (size, fill = '', opacity = -1) => {
  const cssSize = size && size !== 24 ? styleh_components_1.default.css`width:${size}px;height:${size}px;` : ''; // NOTE:  only enable opacity if it falls in this range...

  const cssOpacity = opacity && opacity > 0 && opacity < 1 ? styleh_components_1.default.css`opacity:${opacity};` : '';
  const cssFill = fill && fill !== '' ? styleh_components_1.default.css`g{fill:${fill};}` : '';
  return styleh_components_1.default.withComponent(MaterialIcon_1.MaterialIcon)`${cssSize} ${cssOpacity} ${cssFill}`;
};

exports.styledMaterialIcon = styledMaterialIcon; //# sourceMappingURL=styledMaterialIcon.js.map