outline-icons
Advanced tools
Comparing version 2.0.0 to 2.0.1
import * as React from "react"; | ||
export declare type Props = { | ||
className?: string; | ||
light?: boolean; | ||
black?: boolean; | ||
color?: string; | ||
@@ -14,3 +12,3 @@ size?: number; | ||
}; | ||
declare function Icon({ children, className, onClick, theme, ...rest }: Props & BaseProps): React.ReactElement<React.ComponentProps<any>, any>; | ||
declare function Icon({ children, className, onClick, theme, color, ...rest }: Props & BaseProps): React.ReactElement<React.ComponentProps<any>, any>; | ||
export default Icon; |
@@ -35,13 +35,6 @@ "use strict"; | ||
function Icon(_a) { | ||
var { children, className, onClick, theme } = _a, rest = __rest(_a, ["children", "className", "onClick", "theme"]); | ||
var { children, className, onClick, theme, color = "currentColor" } = _a, rest = __rest(_a, ["children", "className", "onClick", "theme", "color"]); | ||
const size = rest.size ? rest.size + "px" : "24px"; | ||
let fill = "#4E5C6E"; | ||
if (rest.color) | ||
fill = rest.color; | ||
if (rest.light) | ||
fill = "#FFF"; | ||
if (rest.black) | ||
fill = "#000"; | ||
return (React.createElement("svg", { fill: fill, width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", className: className, onClick: onClick }, children)); | ||
return (React.createElement("svg", { fill: color, width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", className: className, onClick: onClick }, children)); | ||
} | ||
exports.default = Icon; |
@@ -32,3 +32,3 @@ "use strict"; | ||
const names = Object.keys(Icons); | ||
(0, react_2.storiesOf)("All", module).add("default", () => react_1.default.createElement(react_1.default.Fragment, null, names.map(name => { | ||
(0, react_2.storiesOf)("All", module).add("default", () => (react_1.default.createElement(react_1.default.Fragment, null, names.map((name) => { | ||
if (name === "default" || name === "Icon") | ||
@@ -38,3 +38,3 @@ return null; | ||
return react_1.default.createElement(Component, { key: name, size: 64 }); | ||
}))); | ||
})))); | ||
for (const name of names) { | ||
@@ -45,7 +45,10 @@ if (name === "default") { | ||
const Component = Icons[name]; | ||
(0, react_2.storiesOf)(name, module).add("default", () => react_1.default.createElement(Component, null)).add("large", () => react_1.default.createElement(Component, { size: 64 })).add("black", () => react_1.default.createElement(Component, { black: true })).add("light", () => react_1.default.createElement(Component, { light: true })); | ||
(0, react_2.storiesOf)(name, module) | ||
.add("default", () => react_1.default.createElement(Component, null)) | ||
.add("large", () => react_1.default.createElement(Component, { size: 64 })) | ||
.add("black", () => react_1.default.createElement(Component, { color: "#000" })) | ||
.add("light", () => react_1.default.createElement(Component, { color: "#FFF" })); | ||
} | ||
; | ||
(0, react_2.storiesOf)("CollectionIcon", module).add("expanded", () => react_1.default.createElement(CollectionIcon_1.default, { expanded: true })); | ||
(0, react_2.storiesOf)("CollectionIcon", module).add("expanded", () => (react_1.default.createElement(CollectionIcon_1.default, { expanded: true }))); | ||
(0, react_2.storiesOf)("ArchiveIcon", module).add("open", () => react_1.default.createElement(ArchiveIcon_1.default, { open: true })); | ||
(0, react_2.storiesOf)("TrashIcon", module).add("open", () => react_1.default.createElement(TrashIcon_1.default, { open: true })); |
{ | ||
"name": "outline-icons", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "An iconset designed for the Outline editor and knowledge base", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
257754
2938