Skip to content

Commit

Permalink
chore: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cakfan committed Apr 18, 2024
1 parent 72004ef commit c17929f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jabirdeveloper/material-symbols",
"version": "0.1.21",
"version": "0.1.22",
"type": "module",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand Down
41 changes: 41 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Material Symbols for React Project

This is just a simple library to use Material Symbols in your React library. You can learn more about Material Symbols from this link: [https://fonts.google.com/icons.](https://fonts.google.com/icons.) This library also includes other libraries namely: [material-symbols](https://www.npmjs.com/package/material-symbols), [clsx](https://www.npmjs.com/package/clsx), and [tailwind-merge](https://www.npmjs.com/package/tailwind-merge).

# Installation

`npm i @jabirdeveloper/material-symbols`

# Usage

Import in CSS (example: index.css in Vite):

`@import "material-symbols";`

Component Symbol props:

<table><tbody><tr><td>filled</td><td>boolean</td></tr><tr><td>variants</td><td>outlined | rounded | sharp</td></tr><tr><td>opticalSize</td><td>20 | 24 | 40 | 48</td></tr><tr><td>weight</td><td>thin | extra_light | &nbsp;light | normal | medium | semi_bold | bold</td></tr><tr><td>grade</td><td>low | normal | high</td></tr><tr><td>className</td><td>string</td></tr></tbody></table>

Example code to display icon:

```typescript
...
import { Symbols } from "@jabirdeveloper/material-symbols";

function App() {

return (
<>
...
<Symbols filled variants="rounded" grade="high" opticalSize={48}>
home
</Symbols>
...
</>
);
}

export default App;
```

Thank you

0 comments on commit c17929f

Please sign in to comment.