Skip to content

Commit 6de23ea

Browse files
committed
feat: now we have an official anchor active state
1 parent 6a58154 commit 6de23ea

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

packages/dnb-design-system-portal/src/pages/uilib/elements/anchor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import CodeBlock from 'Tags/CodeBlock'
88

99
<CodeBlock reactLive hideCode>
1010
{`
11-
<ul>
11+
<ul data-dnb-test="anchor" className="dnb-unstyled-list">
1212
<li>
13-
<a href="/" >Default style</a>
13+
<a href="/" >Default Style</a>
1414
</li>
1515
<li>
1616
<a href="/" className="dnb-hover-style">Hover Style</a>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Screenshot Test
3+
* This file will not run on "test:staged" because we dont require any related files
4+
*/
5+
6+
import { testPageScreenshot } from '../../../core/jest/jestSetupScreenshots'
7+
8+
describe('Anchor screenshot', () => {
9+
const url = '/uilib/elements/anchor?fullscreen'
10+
it('have to match the default choice of anchor styles', async () => {
11+
const screenshot = await testPageScreenshot({
12+
url,
13+
selector: '[data-dnb-test="anchor"]'
14+
})
15+
expect(screenshot).toMatchImageSnapshot()
16+
})
17+
})
Loading

packages/dnb-ui-lib/src/style/themes/theme-ui/anchor-mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
border-bottom-width: 2px;
4242
}
4343
@mixin activeStyle() {
44-
color: #fff;
44+
color: var(--color-mint-green);
4545
background-color: var(--color-sea-green);
4646
border-bottom: none;
4747
border-radius: 0;

0 commit comments

Comments
 (0)