This hook is used to modify an object of Tailwind classNames.
import { useExtendedStyles } from '@sutterhill/hooks'
const defaultStyles = {
body: 'bg-gray-100',
container: 'bg-white text-black',
header: 'bg-gray-200 border-b',
link: 'text-blue-500 hover:text-blue-700',
}
const extendedStyles = {
body: 'bg-red-300',
container: {
replace: ['bg-white', 'bg-gray-100'],
},
header: {
without: 'border-b',
},
link: {
add: 'underline',
}
}
const styles = useExtendedStyles(defaultStyles, extendedStyles)
// styles = {
// body: 'bg-red-300',
// container: 'bg-gray-100 text-black',
// header: 'bg-gray-200',
// link: 'text-blue-500 hover:text-blue-700 underline',
// }