Skip to content

Commit

Permalink
Keep firefox highlight fix className on the HighlightDecoration
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Jan 23, 2025
1 parent cb7df6a commit 04eda09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/components/src/components/decorations/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { cn } from '../../cn';
import { ReactComponent as HighlightDecorationSvg } from './highlight-decoration.svg';

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

/**
Expand All @@ -16,3 +16,9 @@ export function DecorationIsolation(props: React.HTMLAttributes<HTMLDivElement>)
/>
);
}

// Components created from .svg import don't preserve className
export const HighlightDecoration = (props: React.SVGProps<SVGSVGElement>) => (
// eslint-disable-next-line tailwindcss/no-custom-classname
<HighlightDecorationSvg {...props} className={cn(props.className, 'firefox-highlight-fix')} />
);

0 comments on commit 04eda09

Please sign in to comment.