Skip to content

Commit

Permalink
Merge pull request #2034 from dxc-technology/Mil4n0r/tooltip_example
Browse files Browse the repository at this point in the history
Added tooltip example to docs
  • Loading branch information
GomezIvann authored Jul 9, 2024
2 parents a555fb0 + b75d67e commit 7c6ae2a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: npm install

- name: Build library and website
run: npm run build
run: SITE_VERSION=next npm run build

- name: Test library
run: npm run test
Expand Down
2 changes: 1 addition & 1 deletion apps/website/screens/common/componentsList.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
{
"label": "Tooltip",
"path": "/components/tooltip",
"status": "experimental"
"status": "new"
},
{
"label": "Typography",
Expand Down
15 changes: 9 additions & 6 deletions apps/website/screens/components/tooltip/code/TooltipCodePage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { DxcFlex, DxcParagraph, DxcTable } from "@dxc-technology/halstack-react";
import { DxcFlex, DxcTable } from "@dxc-technology/halstack-react";
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
import QuickNavContainer from "@/common/QuickNavContainer";
import DocFooter from "@/common/DocFooter";
import TableCode from "@/common/TableCode";
import basicUsage from "./examples/basicUsage";
import Example from "@/common/example/Example";

const sections = [
{
Expand Down Expand Up @@ -51,11 +53,12 @@ const sections = [
},
{
title: "Examples",
content: (
<DxcParagraph>
The examples are under development and will be available soon.
</DxcParagraph>
),
subSections: [
{
title: "Basic Usage",
content: <Example example={basicUsage} defaultIsVisible />,
},
],
},
];

Expand Down
40 changes: 20 additions & 20 deletions apps/website/screens/components/tooltip/code/examples/basicUsage.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
// import {
// DxcTooltip,
// DxcButton,
// DxcInset,
// } from "@dxc-technology/halstack-react";
import {
DxcTooltip,
DxcButton,
DxcInset,
} from "@dxc-technology/halstack-react";

// const code = `() => {
// return (
// <DxcInset space="2rem">
// <DxcTooltip label="Tooltip Test" position="top">
// <DxcButton label="Hoverable button" />
// </DxcTooltip>
// </DxcInset>
// );
// }`;
const code = `() => {
return (
<DxcInset space="2rem">
<DxcTooltip label="Tooltip Test" position="top">
<DxcButton label="Hoverable button" />
</DxcTooltip>
</DxcInset>
);
}`;

// const scope = {
// DxcTooltip,
// DxcButton,
// DxcInset,
// };
const scope = {
DxcTooltip,
DxcButton,
DxcInset,
};

// export default { code, scope };
export default { code, scope };

0 comments on commit 7c6ae2a

Please sign in to comment.