2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-17 19:21:20 +03:00

fix(293): [color] tag doesn't work in React (#294)

* fix: react color preset

* chore: changeset great-beds-shop.md

* fix: tests

* chore: text fixes
This commit is contained in:
Nikolay Kost
2025-10-05 15:38:17 +02:00
committed by GitHub
parent e943184294
commit 40041a0680
5 changed files with 82 additions and 0 deletions
+6
View File
@@ -1,4 +1,5 @@
import presetHTML5 from '@bbob/preset-html5';
import { getUniqAttr } from "@bbob/plugin-helper";
import type { PresetTagsDefinition } from '@bbob/types';
@@ -30,6 +31,11 @@ const presetReact = presetHTML5.extend<PresetTagsDefinition>((tags) => ({
...tags.s(...args),
...tagAttr({ textDecoration: 'line-through' }),
}),
color: (...args) => ({
...tags.color(...args),
...tagAttr({ color: String(getUniqAttr(args[0].attrs)) }),
})
}));
export default presetReact;