Skip to content

Commit

Permalink
fix(icons-vue): twoToneColor supports reactive (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-hearts authored Oct 7, 2023
1 parent dd75613 commit 16e2d96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/icons-vue/src/components/IconBase.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { generate, getSecondaryColor, isIconDefinition, warning } from '../utils';
import { AbstractNode, IconDefinition } from '@ant-design/icons-svg/lib/types';
import { CSSProperties, FunctionalComponent, PropType } from 'vue';
import { CSSProperties, FunctionalComponent, PropType, reactive } from 'vue';

export interface IconProps {
icon: IconDefinition;
Expand All @@ -21,11 +21,11 @@ export interface TwoToneColorPalette extends TwoToneColorPaletteSetter {
calculated?: boolean; // marker for calculation
}

const twoToneColorPalette: TwoToneColorPalette = {
const twoToneColorPalette: TwoToneColorPalette = reactive({
primaryColor: '#333',
secondaryColor: '#E6E6E6',
calculated: false,
};
});

function setTwoToneColors({ primaryColor, secondaryColor }: TwoToneColorPaletteSetter): void {
twoToneColorPalette.primaryColor = primaryColor;
Expand Down

0 comments on commit 16e2d96

Please sign in to comment.