How to extend TailwindMerge for borderWidth? #393
-
In my borderWidth: {
sm: 'var(--border-width-sm)',
md: 'var(--border-width-md)',
} Now if I use a class like I tried to extend twMerge like this, but it still swallows the style: const twMerge = extendTailwindMerge({
// @ts-expect-error suppress type error ts(2353) TODO: fix
theme: {
borderWidth: ['sm', 'md'],
},
}); What am I doing wrong? P.S. I am getting a typescript error when using the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @nareshbhatia! 👋 You need to wrap your config in either an const twMerge = extendTailwindMerge({
extend: {
theme: {
borderWidth: ['sm', 'md'],
},
},
}); |
Beta Was this translation helpful? Give feedback.
Hey @nareshbhatia! 👋
You need to wrap your config in either an
extend
(oroverride
) object. This config should work: