Browse Source

🛠️ Refactor twFocusClass function

🔧 Improve code readability and maintainability
🪄 Simplify conditional logic
 Add focus ring styles for better UX
🐛 Fix potential bug in focus class
main
John Doe 1 year ago
parent
commit
af1b1dba25
  1. 6
      src/utils/twFocusClass.ts

6
src/utils/twFocusClass.ts

@ -0,0 +1,6 @@
export default function twFocusClass(hasRing = false) {
if (!hasRing) {
return "focus:outline-none";
}
return "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-6000 dark:focus:ring-offset-0";
}
Loading…
Cancel
Save