-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make #logo component also supporting auto sizing
- Loading branch information
1 parent
bd482fc
commit 301bf1d
Showing
12 changed files
with
102 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/dnb-ui-lib/src/components/logo/__tests__/Logo.screenshot.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Screenshot Test | ||
* This file will not run on "test:staged" because we dont require any related files | ||
*/ | ||
|
||
import { | ||
setupPageScreenshot, | ||
testPageScreenshot | ||
} from '../../../core/jest/jestSetup' | ||
|
||
describe('Logo screenshot', () => { | ||
setupPageScreenshot() | ||
it('have to match the screenshot snapshot', async () => { | ||
const screenshot = await testPageScreenshot({ | ||
url: '/uilib/components/logo?fullscreen', | ||
selector: '.example-box .dnb-logo:nth-child(1)' | ||
}) | ||
expect(screenshot).toMatchImageSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.48 KB
...-test-js-logo-screenshot-have-to-match-the-screenshot-snapshot-1-4da8b.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
| Properties | Description | | ||
| ---------- | ---------------------------------------------------------------------------------------------------- | | ||
| `size` | _(optional)_ define the size of the logo. Sets the height. The width will be calculated by the ratio | | ||
| `color` | _(optional)_ define the color of the logo | | ||
| `width` | _(optional)_ define either the width of the logo | | ||
| `height` | _(optional)_ or define the height of the logo | | ||
| Properties | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------------------ | | ||
| `size` | _(optional)_ define the size of the logo. Sets the height. The width will be calculated by the ratio. Defaults to `auto` | | ||
| `color` | _(optional)_ define the color of the logo | | ||
| `width` | _(optional)_ define either the width of the logo | | ||
| `height` | _(optional)_ or define the height of the logo | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters