Skip to content

Commit 8f334d9

Browse files
authored
Keep firefox highlight fix className on the HighlightDecoration (v9) (#2014)
1 parent 8fc2c3b commit 8f334d9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/neat-pears-give.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@theguild/components": patch
3+
---
4+
5+
Keep firefox highlight fix className on the HighlightDecoration (v9)

packages/components/src/components/decorations/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { cn } from '../../cn';
2+
import { ReactComponent as HighlightDecorationSvg } from './highlight-decoration.svg';
23

34
export { ReactComponent as ArchDecoration } from './arch-decoration.svg';
45
export { ReactComponent as ArchDecorationGradientDefs } from './arch-decoration-gradient-defs.svg';
5-
export { ReactComponent as HighlightDecoration } from './highlight-decoration.svg';
66
export { ReactComponent as LargeHiveIconDecoration } from './large-hive-icon-decoration.svg';
77

88
export type DecorationIsolationProps = React.HTMLAttributes<HTMLDivElement>;
@@ -18,3 +18,9 @@ export function DecorationIsolation(props: DecorationIsolationProps) {
1818
/>
1919
);
2020
}
21+
22+
// Components created from .svg import don't preserve className
23+
export const HighlightDecoration = (props: React.SVGProps<SVGSVGElement>) => (
24+
// eslint-disable-next-line tailwindcss/no-custom-classname
25+
<HighlightDecorationSvg {...props} className={cn(props.className, 'firefox-highlight-fix')} />
26+
);

0 commit comments

Comments
 (0)