Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Euilink supports text color #1571

Merged
merged 5 commits into from
Feb 15, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `7.1.0`.
- Added `text` as an color option for `EuiLink` ([#1571](https://github.com/elastic/eui/pull/1571))
snide marked this conversation as resolved.
Show resolved Hide resolved

## [`7.1.0`](https://github.com/elastic/eui/tree/v7.1.0)

Expand Down
7 changes: 7 additions & 0 deletions src-docs/src/views/link/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ export default () => (
warning
</EuiLink>
</li>
<li>
<span>
snide marked this conversation as resolved.
Show resolved Hide resolved
<EuiLink color="text" href="#">
text
</EuiLink>
</span>
</li>
<li>
<span style={{ background: 'black' }}>
<EuiLink color="ghost" href="#">
Expand Down
7 changes: 7 additions & 0 deletions src/components/link/__snapshots__/link.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ exports[`EuiLink supports target 1`] = `
/>
`;

exports[`EuiLink text is rendered 1`] = `
<button
class="euiLink euiLink--text"
type="button"
/>
`;

exports[`EuiLink warning is rendered 1`] = `
<button
class="euiLink euiLink--warning"
Expand Down
3 changes: 2 additions & 1 deletion src/components/link/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ $textColors: (
accent: $euiColorAccent,
warning: $euiColorWarning,
danger: $euiColorDanger,
ghost: #FFF, // Ghost is special and a constant.
text: $euiTextColor,
ghost: $euiColorGhost,
snide marked this conversation as resolved.
Show resolved Hide resolved
);

// Create color modifiers based on the map
Expand Down
1 change: 1 addition & 0 deletions src/components/link/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const colorsToClassNameMap = {
'danger': 'euiLink--danger',
'warning': 'euiLink--warning',
'ghost': 'euiLink--ghost',
'text': 'euiLink--text',
};

export const COLORS = Object.keys(colorsToClassNameMap);
Expand Down