|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: Example Page |
| 4 | + description: An example of a full page in zinc with use of multiple nested tabs, in case you need to show multiple views of data. |
| 5 | +fullWidth: true |
| 6 | +--- |
| 7 | + |
| 8 | +# Example Page |
| 9 | + |
| 10 | +An example of a full page in zinc with use of multiple nested tabs, in case you need to show multiple views of data. |
| 11 | + |
| 12 | +We have a primary set of tabs which uses just the `zn-navbar` component to show the navigation, and then a secondary |
| 13 | +set of tabs which uses the `zn-header` component to show the navigation in a more detailed way. |
| 14 | + |
| 15 | +:::tip |
| 16 | +**Note:** This is subject to change as defining the navigation and dropdown as attributes is not ideal, especially |
| 17 | +for SEO purposes. We should be slotting everything in as children of the components. |
| 18 | +::: |
| 19 | + |
| 20 | +```html:preview |
| 21 | +
|
| 22 | +<style> |
| 23 | + .code-preview__preview { |
| 24 | + background-color: rgb(var(--zn-body)) !important; |
| 25 | + padding: 0 25px 0 0; |
| 26 | + } |
| 27 | +</style> |
| 28 | +
|
| 29 | +<zn-tabs flush primary-caption="Navigation" secondary-caption="content"> |
| 30 | +
|
| 31 | + <!-- This is the navigation for the first set of tabs --> |
| 32 | + <zn-navbar slot="top" |
| 33 | + highlight |
| 34 | + navigation="[{"title":"John Doe","active":false,"hintText":"Overview","launchMode":"page"}]" |
| 35 | + dropdown="[{"tab":"2","title":"Some Actions","type":"dropdown"}]"> |
| 36 | + </zn-navbar> |
| 37 | +
|
| 38 | + <!-- This is the content of the first tab / default --> |
| 39 | + <zn-tabs flush primary-caption="Navigation" secondary-caption="Content"> |
| 40 | +
|
| 41 | + <!-- This is the Navigation/Header for the Inner set of tabs --> |
| 42 | + <zn-header slot="top" caption="Customer" description="My Awesome Customer" |
| 43 | + navigation="[{"title":"Overview"}, {"title":"Details", "tab":"details"}]"> |
| 44 | + </zn-header> |
| 45 | +
|
| 46 | + <!--This is the content of the first tab / default inside the first tab --> |
| 47 | + <div> |
| 48 | + <!-- This is where your page content would be defined --> |
| 49 | + <zn-sp> |
| 50 | + <zn-panel caption="Something">Data Points</zn-panel> |
| 51 | + <zn-panel caption="Another Thing">Other Points</zn-panel> |
| 52 | + </zn-sp> |
| 53 | + </div> |
| 54 | +
|
| 55 | + <!--This is the content of the second tab inside the first tab --> |
| 56 | + <div id="details"> |
| 57 | + <!-- This is where your page content would be defined --> |
| 58 | + <zn-sp> |
| 59 | + <zn-panel caption="Awesome">this is an example of the details tab</zn-panel> |
| 60 | + </zn-sp> |
| 61 | + </div> |
| 62 | + </zn-tabs> |
| 63 | +
|
| 64 | + <!-- This is the content of the second tab --> |
| 65 | + <div id="2"> |
| 66 | + <zn-pane> |
| 67 | + <!-- This is where your page content would be defined --> |
| 68 | + <zn-sp> <!-- Maybe zn-sp should be defaulted into the content? --> |
| 69 | + <zn-panel caption="Number 2">Something Something Darkside</zn-panel> |
| 70 | + </zn-sp> |
| 71 | + </zn-pane> |
| 72 | + </div> |
| 73 | +
|
| 74 | +</zn-tabs> |
| 75 | +
|
| 76 | +``` |
0 commit comments