mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
chore(utils): prevent default prop merge for chip and badge
This commit is contained in:
@@ -17,6 +17,12 @@ const defuTwMerge = createDefu((obj, key, value, namespace) => {
|
||||
if (namespace.endsWith('avatar') && key === 'size') {
|
||||
return false
|
||||
}
|
||||
if (namespace.endsWith('chip') && key === 'size') {
|
||||
return false
|
||||
}
|
||||
if (namespace.endsWith('badge') && key === 'size' || key === 'color' || key === 'variant') {
|
||||
return false
|
||||
}
|
||||
if (typeof obj[key] === 'string' && typeof value === 'string' && obj[key] && value) {
|
||||
// @ts-ignore
|
||||
obj[key] = customTwMerge(obj[key], value)
|
||||
|
||||
Reference in New Issue
Block a user