aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-shared/src/components/link.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/react-shared/src/components/link.tsx')
-rw-r--r--packages/react-shared/src/components/link.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx
index 51ffa1e1d..60891dd7a 100644
--- a/packages/react-shared/src/components/link.tsx
+++ b/packages/react-shared/src/components/link.tsx
@@ -10,11 +10,12 @@ interface LinkProps {
to: string;
type?: LinkType;
shouldOpenInNewTab?: boolean;
- style?: React.CSSProperties;
className?: string;
onMouseOver?: (event: React.MouseEvent<HTMLElement>) => void;
onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
onMouseEnter?: (event: React.MouseEvent<HTMLElement>) => void;
+ textDecoration?: string;
+ fontColor?: string;
}
export interface LinkState {}
@@ -29,11 +30,12 @@ export class Link extends React.Component<LinkProps, LinkState> {
public static defaultProps: Partial<LinkProps> = {
type: LinkType.ReactRoute,
shouldOpenInNewTab: false,
- style: {},
className: '',
onMouseOver: _.noop.bind(_),
onMouseLeave: _.noop.bind(_),
onMouseEnter: _.noop.bind(_),
+ textDecoration: 'none',
+ fontColor: 'inherit',
};
private _outerReactScrollSpan: HTMLSpanElement | null;
constructor(props: LinkProps) {
@@ -46,11 +48,13 @@ export class Link extends React.Component<LinkProps, LinkState> {
}
const styleWithDefault = {
- textDecoration: 'none',
+ textDecoration: this.props.textDecoration,
cursor: 'pointer',
- ...this.props.style,
+ color: this.props.fontColor,
};
+ console.log('styleWithDefault', styleWithDefault);
+
switch (this.props.type) {
case LinkType.External:
return (