@notainc/kamon
Advanced tools
Comparing version 1.1.28 to 1.2.0
{ | ||
"name": "@notainc/kamon", | ||
"version": "1.1.28", | ||
"description": "This is icon system for NOTA Inc.", | ||
"version": "1.2.0", | ||
"description": "This is icon system for Helpfeel Inc.", | ||
"repository": { | ||
@@ -9,2 +9,9 @@ "type": "git", | ||
}, | ||
"type": "module", | ||
"exports": { | ||
"./react": "./dist/react/index.js", | ||
"./react/*": "./dist/react/*.js" | ||
}, | ||
"main": "./dist/react/index.js", | ||
"sideEffects": false, | ||
"license": "MIT", | ||
@@ -15,2 +22,3 @@ "watch": { | ||
"scripts": { | ||
"build": "node generate-react-component.mjs && npm exec tsc", | ||
"build:example": "npm-run-all build:example:*", | ||
@@ -25,7 +33,11 @@ "build:example:sprite": "svg-sprite -C example/config/config.json --shape-transform-svgo example/config/svgo.json svg/*.svg", | ||
"devDependencies": { | ||
"@types/react": "^18.3.5", | ||
"http-server": "^0.11.1", | ||
"npm-run-all": "^4.1.5", | ||
"npm-watch": "^0.5.0", | ||
"svg-sprite": "^1.5.0" | ||
"pascalcase": "^2.0.0", | ||
"svgo": "^3.3.2", | ||
"svg-sprite": "^1.5.0", | ||
"typescript": "^5.6.2" | ||
} | ||
} |
@@ -10,3 +10,22 @@ # kamon | ||
## Useage | ||
## Usage | ||
### React | ||
```js | ||
import { Star, StarFill } from '@notainc/kamon/react'; | ||
/** Or you can use separated import | ||
* import { Star } from '@notainc/kamon/react/Star'; | ||
* import { StarFill } from '@notainc/kamon/react/StarFill'; | ||
**/ | ||
function Like () { | ||
const [liked, setLiked] = useState(false); | ||
return <button onClick={setLiked(prev => !prev)}> | ||
{liked ? <StarFill /> : <Star />} Like | ||
</button> | ||
} | ||
``` | ||
### SVG | ||
* For web applications, we recommend to use SVG Sprites. | ||
@@ -42,2 +61,8 @@ * We are following this process in /example. | ||
## Development | ||
- Clone this repository. | ||
- `npm install` | ||
- `npm run build` | ||
## License | ||
@@ -44,0 +69,0 @@ #### Code |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
457138
503
2494
79
Yes
8
41