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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user