@cultureamp/kaizen-binary-assets
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.2.1](https://github.com/cultureamp/kaizen-design-system/compare/@cultureamp/kaizen-binary-assets@1.2.0...@cultureamp/kaizen-binary-assets@1.2.1) (2019-12-19) | ||
**Note:** Version bump only for package @cultureamp/kaizen-binary-assets | ||
# [1.2.0](https://github.com/cultureamp/kaizen-design-system/compare/@cultureamp/kaizen-binary-assets@1.1.0...@cultureamp/kaizen-binary-assets@1.2.0) (2019-11-07) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@cultureamp/kaizen-binary-assets", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Binary asset management for Culture Amp's Kaizen Design System.", | ||
@@ -21,3 +21,3 @@ "homepage": "https://github.com/cultureamp/kaizen-design-system/packages/binary-asset#readme", | ||
}, | ||
"gitHead": "6b20cd3e644f0ed7a4d67e0ebbf08266b03fc6bc" | ||
"gitHead": "eb93d3584a444e307d75f40ebb94ecc40b1f8b8f" | ||
} |
@@ -22,4 +22,26 @@ # Kaizen Binary Assets | ||
## If you want to use an image | ||
1. Make sure the image exists in the [`kaizen-design-system-assets` repo](https://github.com/cultureamp/kaizen-design-system-assets). If it doesn't, make a PR to add it (ask the Design Systems team for review). Images in this repo will be automatically uploaded and made available via a CloudFront distribution. | ||
2. Make sure that the `@cultureamp/kaizen-binary-assets` package is in your repo's `package.json`. This package provides you the `assetUrl` function that translates the path to the file in the `kaizen-design-system-assets` repo into its equivalent CloudFront URL. | ||
3. Import the `index.ts` or `index.scss` file and you can access the image through the `assetUrl`/`asset-url` function: | ||
```js | ||
// JS | ||
import assetUrl from "@cultureamp/kaizen-binary-assets/lib/index.ts"; | ||
<SomeComponent image={assetUrl("illustrations/ham.png")} /> | ||
``` | ||
```scss | ||
// SCSS | ||
@import "~@cultureamp/kaizen-binary-assets/lib/index.scss"; | ||
.coolpic { | ||
background-image: url(asset-url("illustrations/ham.png")); | ||
} | ||
``` | ||
## See also | ||
- [cultureamp/kaizen-design-system-assets](https://github.com/cultureamp/kaizen-design-system-assets/) |
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
5664
47