@cubist/cubist
Advanced tools
Comparing version 0.0.0-rc6 to 0.0.0-rc7
@@ -5,3 +5,4 @@ import React from "react"; | ||
icon: string; | ||
theme?: "filled" | "outlined" | "rounded" | "twoTone" | "sharp"; | ||
} | ||
export declare function Icon<T extends keyof React.ReactHTML>({ icon, ...rest }: IconProps<T>): JSX.Element; | ||
export declare function Icon<T extends keyof React.ReactHTML>({ icon, theme, ...rest }: IconProps<T>): JSX.Element; |
@@ -22,9 +22,20 @@ "use strict"; | ||
var DEFAULT_THEME = "filled"; | ||
var FONT_FAMILIES = { | ||
filled: "'Material Icons'", | ||
outlined: "'Material Icons Outlined'", | ||
rounded: "'Material Icons Round'", | ||
twoTone: "'Material Icons Two Tone'", | ||
sharp: "'Material Icons Sharp'" | ||
}; | ||
function Icon(_ref) { | ||
var icon = _ref.icon, | ||
rest = _objectWithoutProperties(_ref, ["icon"]); | ||
theme = _ref.theme, | ||
rest = _objectWithoutProperties(_ref, ["icon", "theme"]); | ||
var fontFamily = FONT_FAMILIES[theme || DEFAULT_THEME]; | ||
return (0, _core.jsx)(_Pallet.Pallet, _extends({ | ||
is: "i", | ||
fontFamily: "'Material Icons'", | ||
fontFamily: fontFamily, | ||
fontWeight: "normal", | ||
@@ -31,0 +42,0 @@ fontStyle: "normal", |
@@ -50,2 +50,24 @@ "use strict"; | ||
}))); | ||
}).add("varying styles colors", function () { | ||
return (0, _core.jsx)(_react2["default"].Fragment, null, (0, _core.jsx)(_Icon.Icon, { | ||
fontSize: "48px", | ||
icon: "live_help", | ||
theme: "filled" | ||
}), (0, _core.jsx)(_Icon.Icon, { | ||
fontSize: "48px", | ||
icon: "live_help", | ||
theme: "outlined" | ||
}), (0, _core.jsx)(_Icon.Icon, { | ||
fontSize: "48px", | ||
icon: "live_help", | ||
theme: "rounded" | ||
}), (0, _core.jsx)(_Icon.Icon, { | ||
fontSize: "48px", | ||
icon: "live_help", | ||
theme: "twoTone" | ||
}), (0, _core.jsx)(_Icon.Icon, { | ||
fontSize: "48px", | ||
icon: "live_help", | ||
theme: "sharp" | ||
})); | ||
}); |
{ | ||
"name": "@cubist/cubist", | ||
"version": "0.0.0-rc6", | ||
"version": "0.0.0-rc7", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42997
1014