Last active
May 30, 2020 07:03
-
-
Save Kenshin/e738f742bf41ef7c8f30c24590e5d6c8 to your computer and use it in GitHub Desktop.
MDUIKit light
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mduikit = (function (exports) { | |
'use strict'; | |
/** | |
* Button | |
* | |
* @param {string} href | |
* @param {string} text | |
* @param {string} disable | |
* @param {string} color | |
* @param {string} bgColor | |
*/ | |
var Button = function Button(href, text) { | |
var disable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | |
var color = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "rgba(255, 255, 255, .7)"; | |
var bgColor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "rgba(0, 137, 123, 1)"; | |
href == undefined && (href = "javascript:;"); | |
var style = disable == true ? "cursor: no-drop;background-color: rgb(229, 229, 229);" : ""; | |
return "<a onclick=\"mduikitOnclick()\" style=\"display:block;min-width:88px;height:36px;margin:6px;padding:0;font-family:sans-serif;text-decoration:none;cursor:pointer;border:none;border-radius:2px;box-shadow:0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);color:" + color + ";background-color:" + bgColor + ";margin-right:0px;" + style + "\" class=\"md-waves-effect md-waves-button\" href=\"" + href + "\" target=\"_self\" type=\"raised\">\n <button-mask style=\"display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; margin: 0px; padding: 0px 8px; border: medium none; border-radius: 2px; box-sizing: border-box; transition: all 0.5s ease-in-out 0s; background-color: transparent;\">\n <button-span style=\"display:flex;align-items:center;user-select:none;\">\n <button-icon style=\"order:-1;display:none;width:24px;height:24px;border:none;background-position:center;background-repeat:no-repeat;\"></button-icon>\n <button-text style=\"padding:0 8px 0;text-decoration:none;text-align:center;letter-spacing:.5px;font-size:15px;line-height:1;\">" + text + "</button-text>\n </button-span>\n </button-mask>\n </a>"; | |
}; | |
exports.Button = Button; | |
return exports; | |
}({})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment