Skip to content

Commit

Permalink
🐛 svg styles override unintentionally
Browse files Browse the repository at this point in the history
  • Loading branch information
arunachalam-monk committed Jun 11, 2024
1 parent be49e75 commit 2a3419f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions documentation/src/components/Sights/SightCard/SightCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Sight, VehicleDetails, VehicleModel } from '@monkvision/types';
import { CopyPopup, CopyPopupHandle } from '@site/src/components';
import { DynamicSVG } from '../../domOnly';
import styles from './SightCard.module.css';
import { DynamicSVGCustomizationFunctions } from '@monkvision/common-ui-web';

const vehicleModelDisplayOverlays: Record<Exclude<VehicleModel, VehicleModel.ALL>, string> = {
[VehicleModel.AUDIA7]: sights['audia7-WKJlxkiF'].overlay,
Expand Down Expand Up @@ -53,11 +54,11 @@ export function SightCard({ item }: SightCardProps) {
copyPopupRef.current?.open();
};

const getOverlayAttributes = () => ({
style: {
stroke: isDarkTheme ? '#ffffff' : '#000000',
},
});
const getOverlayAttributes: DynamicSVGCustomizationFunctions['getAttributes'] = (element) => {
element.attributeStyleMap.forEach(console.log);
element.attributeStyleMap.set('stroke', isDarkTheme ? '#ffffff' : '#000000')
return null;
};

return (
<>
Expand Down

0 comments on commit 2a3419f

Please sign in to comment.