File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,23 @@ import { CommonStyledProps } from '../types';
55
66type AnchorProps = {
77 children : React . ReactNode ;
8+ underline ?: boolean ;
89} & React . AnchorHTMLAttributes < HTMLAnchorElement > &
910 CommonStyledProps ;
1011
1112const StyledAnchor = styled . a < { underline : boolean } > `
1213 color: ${ ( { theme } ) => theme . anchor } ;
1314 font-size: inherit;
14- text-decoration: underline;
15+ text-decoration: ${ ( { underline } ) => ( underline ? 'underline' : 'none' ) } ;
1516 &:visited {
1617 color: ${ ( { theme } ) => theme . anchorVisited } ;
1718 }
1819` ;
1920
2021const Anchor = forwardRef < HTMLAnchorElement , AnchorProps > (
21- ( { children, ...otherProps } : AnchorProps , ref ) => {
22+ ( { children, underline = true , ...otherProps } : AnchorProps , ref ) => {
2223 return (
23- < StyledAnchor ref = { ref } { ...otherProps } >
24+ < StyledAnchor ref = { ref } underline = { underline } { ...otherProps } >
2425 { children }
2526 </ StyledAnchor >
2627 ) ;
You can’t perform that action at this time.
0 commit comments