-
Notifications
You must be signed in to change notification settings - Fork 14
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 #1346 from dxc-technology/aida-quicknav-website
Changed website to match fix of quick nav
- Loading branch information
Showing
7 changed files
with
109 additions
and
11 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
81 changes: 81 additions & 0 deletions
81
website/screens/components/quick-nav/code/examples/withContent.ts
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,81 @@ | ||
import { | ||
DxcInset, | ||
DxcQuickNav, | ||
DxcFlex, | ||
DxcHeading, | ||
DxcParagraph, | ||
} from "@dxc-technology/halstack-react"; | ||
|
||
const code = `() => { | ||
const links = [ | ||
{ | ||
label: "Accordion", | ||
links: [{ label: "Code" }, { label: "Usage" }], | ||
}, | ||
{ | ||
label: "Alert", | ||
links: [{ label: "Code" }], | ||
}, | ||
]; | ||
return ( | ||
<DxcInset space="2rem"> | ||
<DxcFlex direction="row"> | ||
<DxcFlex direction="column" gap="2rem"> | ||
<div id="accordion"> | ||
<DxcFlex direction="column" gap="1rem"> | ||
<DxcHeading level={2} text="Accordion" /> | ||
<div id="accordion-code"> | ||
<DxcFlex direction="column" gap="1rem"> | ||
<DxcHeading level={3} text="Code" /> | ||
<DxcParagraph> | ||
Accordions are used to group similar content and hide or | ||
show it depending on user needs or preferences. Accordions | ||
give users more granular control over the interface and help | ||
digest content in stages, rather than all at once. | ||
</DxcParagraph> | ||
</DxcFlex> | ||
</div> | ||
<div id="accordion-usage"> | ||
<DxcFlex direction="column" gap="1rem"> | ||
<DxcHeading level={3} text="Usage" /> | ||
<DxcParagraph> | ||
The accordion component delivers large amounts of content in | ||
a small space through progressive disclosure. | ||
</DxcParagraph> | ||
</DxcFlex> | ||
</div> | ||
</DxcFlex> | ||
</div> | ||
<div id="alert"> | ||
<DxcFlex direction="column" gap="1rem"> | ||
<DxcHeading level={2} text="Alert" /> | ||
<div id="alert-code"> | ||
<DxcFlex direction="column" gap="1rem"> | ||
<DxcHeading level={3} text="Code" /> | ||
<DxcParagraph> | ||
Alert messages are meant to provide contextual feedback | ||
about important changes in the interface. | ||
</DxcParagraph> | ||
</DxcFlex> | ||
</div> | ||
</DxcFlex> | ||
</div> | ||
</DxcFlex> | ||
<DxcInset space="2rem"> | ||
<DxcQuickNav links={links}></DxcQuickNav> | ||
</DxcInset> | ||
</DxcFlex> | ||
</DxcInset> | ||
); | ||
}`; | ||
|
||
const scope = { | ||
DxcInset, | ||
DxcQuickNav, | ||
DxcFlex, | ||
DxcHeading, | ||
DxcParagraph, | ||
}; | ||
|
||
export default { code, scope }; |
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