-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5526 from matuzalemsteles/issue-5515
feat(@clayui/nav): add new composition to Vertical Nav with collection API and adds new `expandedKeys` API
- Loading branch information
Showing
23 changed files
with
1,462 additions
and
315 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* SPDX-FileCopyrightText: © 2023 Liferay, Inc. <https://liferay.com> | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
import {cleanup, render} from '@testing-library/react'; | ||
import React from 'react'; | ||
|
||
import {Nav} from '../'; | ||
|
||
describe('Nav basic rendering', () => { | ||
afterEach(() => cleanup()); | ||
|
||
it('renders', () => { | ||
const {container} = render( | ||
<Nav> | ||
<Nav.Item> | ||
<Nav.Link active href="#"> | ||
Active | ||
</Nav.Link> | ||
</Nav.Item> | ||
<Nav.Item> | ||
<Nav.Link href="#">Normal</Nav.Link> | ||
</Nav.Item> | ||
<Nav.Item> | ||
<Nav.Link disabled href="#"> | ||
Disabled | ||
</Nav.Link> | ||
</Nav.Item> | ||
</Nav> | ||
); | ||
|
||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
packages/clay-core/src/nav/__tests__/__snapshots__/BasicRendering.tsx.snap
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,40 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Nav basic rendering renders 1`] = ` | ||
<div> | ||
<ul | ||
class="nav" | ||
> | ||
<li | ||
class="nav-item" | ||
> | ||
<a | ||
class="nav-link active" | ||
href="#" | ||
> | ||
Active | ||
</a> | ||
</li> | ||
<li | ||
class="nav-item" | ||
> | ||
<a | ||
class="nav-link" | ||
href="#" | ||
> | ||
Normal | ||
</a> | ||
</li> | ||
<li | ||
class="nav-item" | ||
> | ||
<a | ||
class="nav-link disabled" | ||
href="#" | ||
> | ||
Disabled | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
`; |
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,6 @@ | ||
/** | ||
* SPDX-FileCopyrightText: © 2023 Liferay, Inc. <https://liferay.com> | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
export {default as Nav} from './Nav'; |
Oops, something went wrong.