UNPKG

ukelli-ui

Version:

Base on React's UI lib. Make frontend's dev simpler and faster.

61 lines (60 loc) 1.35 kB
var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; export var ThemeColor = [ 'theme', ]; export var ExampleColors = [ // nature color // 'theme', 'blue', 'green', 'orange', 'red', 'default', ]; export var NatureColors = [ // nature color 'blue', 'light-blue', 'cyan', 'green', 'yellow', 'orange', 'red', 'purple', ]; export var GrayscaleColors = [ // Grayscale 'white', 'black', 'grey', 'default', ]; export var StatusColors = [ // status color 'important', 'primary', 'danger', 'error', 'success', 'warn', 'warm', ]; export var ColorGroup = __spreadArrays(ThemeColor, NatureColors, GrayscaleColors, StatusColors); /** * 遍历颜色系统选项 * @param Colors */ export var ForEachColor = function (Colors) { if (Colors === void 0) { Colors = ExampleColors; } return function (getComponent) { if (!getComponent) return null; return Colors.map(function (color, idx) { return getComponent(color, idx); }); }; };