@khanacademy/wonder-blocks-icon
Advanced tools
Comparing version 1.2.2 to 1.2.3
A minimal `Icon` usage: | ||
```jsx | ||
const {default: Icon, icons} = require("@khanacademy/wonder-blocks-icon"); | ||
import {icons} from "@khanacademy/wonder-blocks-icon"; | ||
@@ -13,4 +13,4 @@ <Icon icon={icons.search} size="small" /> | ||
```jsx | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const {default: Icon, icons} = require("@khanacademy/wonder-blocks-icon"); | ||
import {View} from "@khanacademy/wonder-blocks-core"; | ||
import {icons} from "@khanacademy/wonder-blocks-icon"; | ||
@@ -27,7 +27,6 @@ <View> | ||
```jsx | ||
import {View} from "@khanacademy/wonder-blocks-core"; | ||
import {icons} from "@khanacademy/wonder-blocks-icon"; | ||
import Color from "@khanacademy/wonder-blocks-color"; | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const {default: Icon, icons} = require("@khanacademy/wonder-blocks-icon"); | ||
const Color = require("@khanacademy/wonder-blocks-color").default; | ||
<View> | ||
@@ -34,0 +33,0 @@ Here is an icon inline: |
@@ -6,5 +6,5 @@ Icon is a collection of SVGs that are to be used for all of the most common icons in an application. | ||
```jsx | ||
const {StyleSheet, css} = require("aphrodite"); | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const {default: Icon, icons} = require("@khanacademy/wonder-blocks-icon"); | ||
import {StyleSheet, css} from "aphrodite"; | ||
import {View} from "@khanacademy/wonder-blocks-core"; | ||
import Icon, {icons} from "@khanacademy/wonder-blocks-icon"; | ||
@@ -11,0 +11,0 @@ const headings = ["small", "medium"]; |
@@ -11,15 +11,10 @@ // This file is auto-generated by gen-snapshot-tests.js | ||
jest.mock("react-dom"); | ||
import Icon from "./components/icon.js"; | ||
import {StyleSheet, css} from "aphrodite"; | ||
import {View} from "@khanacademy/wonder-blocks-core"; | ||
import Icon, {icons} from "@khanacademy/wonder-blocks-icon"; | ||
import Color from "@khanacademy/wonder-blocks-color"; | ||
describe("wonder-blocks-icon", () => { | ||
it("example 1", () => { | ||
const {StyleSheet, css} = require("aphrodite"); | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const { | ||
default: Icon, | ||
icons, | ||
} = require("@khanacademy/wonder-blocks-icon"); | ||
const headings = ["small", "medium"]; | ||
const styles = StyleSheet.create({ | ||
@@ -43,7 +38,8 @@ emptyCell: { | ||
}); | ||
const example = ( | ||
<table | ||
className={css(styles.table)} | ||
style={{borderCollapse: "collapse"}} | ||
style={{ | ||
borderCollapse: "collapse", | ||
}} | ||
> | ||
@@ -91,2 +87,3 @@ <thead> | ||
} | ||
return ( | ||
@@ -107,12 +104,7 @@ <td | ||
); | ||
const tree = renderer.create(example).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
it("example 2", () => { | ||
const { | ||
default: Icon, | ||
icons, | ||
} = require("@khanacademy/wonder-blocks-icon"); | ||
const example = <Icon icon={icons.search} size="small" />; | ||
@@ -122,9 +114,4 @@ const tree = renderer.create(example).toJSON(); | ||
}); | ||
it("example 3", () => { | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const { | ||
default: Icon, | ||
icons, | ||
} = require("@khanacademy/wonder-blocks-icon"); | ||
const example = ( | ||
@@ -140,10 +127,4 @@ <View> | ||
}); | ||
it("example 4", () => { | ||
const {View} = require("@khanacademy/wonder-blocks-core"); | ||
const { | ||
default: Icon, | ||
icons, | ||
} = require("@khanacademy/wonder-blocks-icon"); | ||
const Color = require("@khanacademy/wonder-blocks-color").default; | ||
const example = ( | ||
@@ -156,3 +137,5 @@ <View> | ||
color={Color.red} | ||
style={{margin: 2}} | ||
style={{ | ||
margin: 2, | ||
}} | ||
/> | ||
@@ -162,3 +145,2 @@ It has color, too. | ||
); | ||
const tree = renderer.create(example).toJSON(); | ||
@@ -165,0 +147,0 @@ expect(tree).toMatchSnapshot(); |
{ | ||
"name": "@khanacademy/wonder-blocks-icon", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"design": "v1", | ||
@@ -18,6 +18,6 @@ "publishConfig": { | ||
"dependencies": { | ||
"@khanacademy/wonder-blocks-core": "^2.4.0" | ||
"@khanacademy/wonder-blocks-core": "^2.4.1" | ||
}, | ||
"devDependencies": { | ||
"@khanacademy/wonder-blocks-color": "^1.1.6", | ||
"@khanacademy/wonder-blocks-color": "^1.1.7", | ||
"wb-dev-build-settings": "^0.0.2" | ||
@@ -24,0 +24,0 @@ }, |
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
92902
1454