Skip to content

Commit

Permalink
docs(README): mention default-weight option
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Dec 30, 2024
1 parent 80e74fe commit 0f94f7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/selfish-drinks-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'phosphor-icons-tailwindcss': patch
---

add `defaultWeight` / `default-weight` option to README
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ You need to add two classes to your markup:
2. an **specifier** class with the syntax: `ph-[<name><--weight>]`, corresponding to your desired icon.

> [!NOTE]
> `weight` is optional and defaults to "regular" if not specified.
> `weight` is optional and defaults to `defaultWeight` config option, or "regular" if not specified.
For example:

Expand Down Expand Up @@ -101,6 +101,7 @@ export default {
prefix: 'ph', // for the icon classes
layer: 'icons', // for the CSS layer
customProperty: '--ph-url',
defaultWeight: 'regular',
})],
};
```
Expand All @@ -113,6 +114,7 @@ Similarly, for Tailwind 4:
prefix: ph;
layer: icons;
custom-property: --ph-url; /* use the kebab-case alias to avoid auto-format by stylelint / prettier */
default-weight: regular;
}
```

Expand Down

0 comments on commit 0f94f7a

Please sign in to comment.