Skip to content

Commit

Permalink
[misc] Fix EuiLink theme params to match other files
Browse files Browse the repository at this point in the history
- simplifies usage
  • Loading branch information
cee-chen committed May 11, 2022
1 parent 24e389a commit 6103653
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/components/link/link.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ export const euiLinkHoverCSS = () => {
`;
};

export const euiLinkFocusCSS = ({ euiTheme }: UseEuiTheme) => {
export const euiLinkFocusCSS = (euiTheme: UseEuiTheme['euiTheme']) => {
return `
text-decoration: underline;
text-decoration-thickness: ${euiTheme.border.width.thick} !important;
`;
};

export const euiLinkCSS = (_theme: UseEuiTheme) => {
const { euiTheme } = _theme;

export const euiLinkCSS = (euiTheme: UseEuiTheme['euiTheme']) => {
return `
font-weight: ${euiTheme.font.weight.medium};
text-align: left;
Expand All @@ -52,17 +50,15 @@ export const euiLinkCSS = (_theme: UseEuiTheme) => {
&:focus {
${euiFocusRing(euiTheme, 'outset')}
${euiLinkFocusCSS(_theme)}
${euiLinkFocusCSS(euiTheme)}
}
`;
};

export const euiLinkStyles = (_theme: UseEuiTheme) => {
const { euiTheme } = _theme;

export const euiLinkStyles = ({ euiTheme }: UseEuiTheme) => {
return {
euiLink: css`
${euiLinkCSS(_theme)}
${euiLinkCSS(euiTheme)}
user-select: text;
&[target='_blank'] {
Expand Down

0 comments on commit 6103653

Please sign in to comment.