Skip to content

Commit 7c6ae2a

Browse files
authored
Merge pull request #2034 from dxc-technology/Mil4n0r/tooltip_example
Added tooltip example to docs
2 parents a555fb0 + b75d67e commit 7c6ae2a

File tree

4 files changed

+31
-28
lines changed

4 files changed

+31
-28
lines changed

.github/workflows/publish-next.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: npm install
3636

3737
- name: Build library and website
38-
run: npm run build
38+
run: SITE_VERSION=next npm run build
3939

4040
- name: Test library
4141
run: npm run test

apps/website/screens/common/componentsList.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
{
124124
"label": "Tooltip",
125125
"path": "/components/tooltip",
126-
"status": "experimental"
126+
"status": "new"
127127
},
128128
{
129129
"label": "Typography",

apps/website/screens/components/tooltip/code/TooltipCodePage.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { DxcFlex, DxcParagraph, DxcTable } from "@dxc-technology/halstack-react";
1+
import { DxcFlex, DxcTable } from "@dxc-technology/halstack-react";
22
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
33
import QuickNavContainer from "@/common/QuickNavContainer";
44
import DocFooter from "@/common/DocFooter";
55
import TableCode from "@/common/TableCode";
6+
import basicUsage from "./examples/basicUsage";
7+
import Example from "@/common/example/Example";
68

79
const sections = [
810
{
@@ -51,11 +53,12 @@ const sections = [
5153
},
5254
{
5355
title: "Examples",
54-
content: (
55-
<DxcParagraph>
56-
The examples are under development and will be available soon.
57-
</DxcParagraph>
58-
),
56+
subSections: [
57+
{
58+
title: "Basic Usage",
59+
content: <Example example={basicUsage} defaultIsVisible />,
60+
},
61+
],
5962
},
6063
];
6164

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
// import {
2-
// DxcTooltip,
3-
// DxcButton,
4-
// DxcInset,
5-
// } from "@dxc-technology/halstack-react";
1+
import {
2+
DxcTooltip,
3+
DxcButton,
4+
DxcInset,
5+
} from "@dxc-technology/halstack-react";
66

7-
// const code = `() => {
8-
// return (
9-
// <DxcInset space="2rem">
10-
// <DxcTooltip label="Tooltip Test" position="top">
11-
// <DxcButton label="Hoverable button" />
12-
// </DxcTooltip>
13-
// </DxcInset>
14-
// );
15-
// }`;
7+
const code = `() => {
8+
return (
9+
<DxcInset space="2rem">
10+
<DxcTooltip label="Tooltip Test" position="top">
11+
<DxcButton label="Hoverable button" />
12+
</DxcTooltip>
13+
</DxcInset>
14+
);
15+
}`;
1616

17-
// const scope = {
18-
// DxcTooltip,
19-
// DxcButton,
20-
// DxcInset,
21-
// };
17+
const scope = {
18+
DxcTooltip,
19+
DxcButton,
20+
DxcInset,
21+
};
2222

23-
// export default { code, scope };
23+
export default { code, scope };

0 commit comments

Comments
 (0)