Skip to content

Commit c4867f4

Browse files
fix(gw2-ui): Types for partial props overrides (#54)
1 parent aa5e577 commit c4867f4

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

gw2-ui/src/components/CustomComponent/CustomComponent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export interface CustomComponentProps
2020
text?: string;
2121
disableLink?: boolean;
2222
disableTooltip?: boolean;
23-
tooltipProps?: TooltipProps;
24-
wikiLinkProps?: WikiLinkProps;
23+
tooltipProps?: Partial<TooltipProps>;
24+
wikiLinkProps?: Partial<WikiLinkProps>;
2525
}
2626

2727
const CustomComponent = (props: CustomComponentProps): ReactElement => {

gw2-ui/src/components/DetailsHeader/DetailsHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface DetailsHeaderFlagProps {
1111

1212
export interface DetailsHeaderProps {
1313
icon?: string;
14-
iconProps?: IconProps;
14+
iconProps?: Partial<IconProps>;
1515
titleClassName?: string;
1616
flags?: DetailsHeaderFlagProps[];
1717
className?: string;

gw2-ui/src/components/Effect/Effect.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export interface EffectProps {
2828
disableLink?: boolean;
2929
disableIcon?: boolean;
3030
inline?: boolean;
31-
tooltipProps?: TooltipProps;
32-
wikiLinkProps?: WikiLinkProps;
33-
errorProps?: ErrorProps;
34-
iconProps?: IconProps;
31+
tooltipProps?: Partial<TooltipProps>;
32+
wikiLinkProps?: Partial<WikiLinkProps>;
33+
errorProps?: Partial<ErrorProps>;
34+
iconProps?: Partial<IconProps>;
3535
className?: string;
3636
style?: CSSProperties;
3737
}

gw2-ui/src/components/Error/Error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ErrorProps {
2222
disableText?: boolean;
2323
disableTooltip?: boolean;
2424
inline?: boolean;
25-
tooltipProps?: TooltipProps;
25+
tooltipProps?: Partial<TooltipProps>;
2626
className?: string;
2727
style?: CSSProperties;
2828
}

gw2-ui/src/components/IconWithText/IconWithText.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export interface IconWithTextProps {
1111
disableIcon?: boolean;
1212
disableText?: boolean;
1313
inline?: boolean;
14-
iconProps?: IconProps;
14+
iconProps?: Partial<IconProps>;
1515
textProps?: any;
16-
progressProps?: ProgressProps;
16+
progressProps?: Partial<ProgressProps>;
1717
loading?: boolean;
1818
style?: CSSProperties;
1919
className?: string;

gw2-ui/src/components/Item/ItemInternal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export interface ItemInternalProps {
2626
disableLink?: boolean;
2727
disableTooltip?: boolean;
2828
inline?: boolean;
29-
tooltipProps?: TooltipProps;
30-
wikiLinkProps?: WikiLinkProps;
29+
tooltipProps?: Partial<TooltipProps>;
30+
wikiLinkProps?: Partial<WikiLinkProps>;
3131
upgrades?: ItemUpgrades;
3232
style?: CSSProperties;
3333
className?: string;

gw2-ui/src/components/Race/Race.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export interface RaceProps {
1818
disableText?: boolean;
1919
disableLink?: boolean;
2020
inline?: boolean;
21-
wikiLinkProps?: WikiLinkProps;
22-
errorProps?: ErrorProps;
21+
wikiLinkProps?: Partial<WikiLinkProps>;
22+
errorProps?: Partial<ErrorProps>;
2323
className?: string;
2424
style?: CSSProperties;
2525
}

gw2-ui/src/components/Skill/SkillInternal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export interface SkillInternalProps
1616
text?: string;
1717
disableLink?: boolean;
1818
disableTooltip?: boolean;
19-
tooltipProps?: TooltipProps;
20-
wikiLinkProps?: WikiLinkProps;
19+
tooltipProps?: Partial<TooltipProps>;
20+
wikiLinkProps?: Partial<WikiLinkProps>;
2121
style?: CSSProperties;
2222
className?: string;
2323
}

gw2-ui/src/components/Trait/TraitInternal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export interface TraitInternalProps {
2020
disableLink?: boolean;
2121
disableTooltip?: boolean;
2222
inline?: boolean;
23-
tooltipProps?: TooltipProps;
24-
wikiLinkProps?: WikiLinkProps;
23+
tooltipProps?: Partial<TooltipProps>;
24+
wikiLinkProps?: Partial<WikiLinkProps>;
2525
inactive?: boolean;
2626
style?: CSSProperties;
2727
className?: string;

0 commit comments

Comments
 (0)