File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' phosphor-icons-tailwindcss ' : patch
3+ ---
4+
5+ allow passing ` custom-property ` option (alias to ` customProperty ` ) to better match CSS naming
6+ convention (helpful to avoid auto-format when used with Tailwind 4 ` @plugin ` syntax)
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ export interface Options {
1212 * CSS custom property for icon URL.
1313 * Default to `--ph-url`
1414 */
15+ 'custom-property' : string ;
16+ /** alias for 'custom-property' option */
1517 customProperty : string ;
1618}
1719
Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ const ICON_SET = /** @type {Set<string>} */ (new Set(icons.map((i) => i.name)));
88
99export default createPlugin . withOptions (
1010 /** @param {Partial<import('./plugin').Options> } options */
11- function ( options ) {
12- const { prefix = 'ph' , customProperty = '--ph-url' } = options ?? { } ;
11+ function ( options = { } ) {
12+ const prefix = options . prefix ?? 'ph' ;
13+ const customProperty = options [ 'custom-property' ] ?? options [ 'customProperty' ] ?? '--ph-url' ;
1314
1415 return function ( api ) {
1516 api . addComponents ( {
You can’t perform that action at this time.
0 commit comments