Skip to content

Commit

Permalink
fix: unocss reports cursor warning in rate component started (#252)
Browse files Browse the repository at this point in the history
* fix: unocss reports warning in rate style

* style: modify rate disabled shortcuts
  • Loading branch information
vtrbo committed Sep 15, 2023
1 parent 8018c37 commit 18eb9fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/Rate/src/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
text = (isString(texts) ? texts : textsMap[Math.ceil(currentValue)]) as string;
} else if (showScore) {
text = scoreTemplate.replace(
/\{\s*value\s*\}/,
/\{\s*value\s*\}/g,
readonly || disabled ? `${value}` : `${currentValue}`
);
} else {
Expand Down
8 changes: 4 additions & 4 deletions preset/src/shortcuts/rate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ export const rateShortcuts: Record<string, string> = {
'k-rate': 'fsc',

// disabled
'k-rate--disabled': 'op60 cursor',
'k-rate--disabled': 'op60 k-cur-disabled',

// readonly
'k-rate--readonly': '',
'k-rate--readonly': 'cursor-auto',

// item
'k-rate--item': 'infcc',
'k-rate--item__not-readonly': 'cursor-pointer',
'k-rate--item__disabled': 'cursor-not-allowed',
'k-rate--item__disabled': 'k-cur-disabled',

// text
'k-rate--text': 'ml-6px text-10px line-height-1'
'k-rate--text': 'ml-6px text-10px line-height-none'
};

0 comments on commit 18eb9fb

Please sign in to comment.