feat(Toggle): add loading prop (#1546)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Mohammad Amin Mokhtari
2024-03-25 15:13:15 +03:30
committed by GitHub
parent 224ec3c1fb
commit e1e05af0ba
3 changed files with 48 additions and 6 deletions

View File

@@ -49,12 +49,14 @@ export default {
'2xl': 'h-6 w-6'
},
on: 'text-{color}-500 dark:text-{color}-400',
off: 'text-gray-400 dark:text-gray-500'
off: 'text-gray-400 dark:text-gray-500',
loading: 'animate-spin text-{color}-500 dark:text-{color}-400'
},
default: {
onIcon: null,
offIcon: null,
loadingIcon: 'i-heroicons-arrow-path-20-solid',
color: 'primary',
size: 'md'
}
}
}