@@ -4,12 +4,22 @@ import DocFooter from "@/common/DocFooter";
44import StatusBadge from "@/common/StatusBadge" ;
55import Code , { ExtendedTableCode , TableCode } from "@/common/Code" ;
66
7+ const bottomLinksTypeString = `{
8+ href: string;
9+ text: string;
10+ }[]` ;
11+
712const logoTypeString = `{
8- href?: string;
913 src: string;
10- title? : string;
14+ alt : string;
1115}` ;
1216
17+ const socialLinkTypeString = `{
18+ href: string;
19+ title: string;
20+ logo: string | SVG;
21+ }[]` ;
22+
1323const sections = [
1424 {
1525 title : "Props" ,
@@ -27,7 +37,7 @@ const sections = [
2737 < tr >
2838 < td > bottomLinks</ td >
2939 < td >
30- < TableCode > { "{ href: string; text: string; }[]" } </ TableCode >
40+ < ExtendedTableCode > { bottomLinksTypeString } </ ExtendedTableCode >
3141 </ td >
3242 < td >
3343 An array of objects representing the links that will be rendered at the bottom part of the footer. Each
@@ -46,9 +56,12 @@ const sections = [
4656 < tr >
4757 < td > children</ td >
4858 < td >
49- < TableCode > React.ReactNode</ TableCode >
59+ < TableCode > ReactNode</ TableCode >
60+ </ td >
61+ < td >
62+ Contains DxcFooter.LeftContent and DxcFooter.RightContent components to customize the left and right
63+ content of the footer respectively.
5064 </ td >
51- < td > The center section of the footer. Can be used to render custom content in this area.</ td >
5265 < td > -</ td >
5366 </ tr >
5467 < tr >
@@ -63,33 +76,33 @@ const sections = [
6376 < td >
6477 < DxcFlex direction = "column" gap = "var(--spacing-gap-xs)" alignItems = "baseline" >
6578 < StatusBadge status = "new" />
66- logo
79+ leftContent
6780 </ DxcFlex >
6881 </ td >
6982 < td >
70- < td >
71- < TableCode > { "Logo" } </ TableCode >
72- < p >
73- being < Code > Logo</ Code > an object with the following properties:
74- </ p >
75- < ExtendedTableCode > { logoTypeString } </ ExtendedTableCode >
76- </ td >
83+ < TableCode > ReactNode</ TableCode >
7784 </ td >
78- < td > Logo to be displayed inside the header .</ td >
85+ < td > Content to be displayed on the left side of the footer under the logo .</ td >
7986 < td > -</ td >
8087 </ tr >
8188 < tr >
82- < td > margin</ td >
8389 < td >
84- < TableCode > 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge'</ TableCode >
90+ < DxcFlex direction = "column" gap = "var(--spacing-gap-xs)" alignItems = "baseline" >
91+ < StatusBadge status = "new" />
92+ logo
93+ </ DxcFlex >
94+ </ td >
95+ < td >
96+ < td >
97+ < ExtendedTableCode > { logoTypeString } </ ExtendedTableCode >
98+ </ td >
8599 </ td >
86- < td > Size of the top margin to be applied to the footer.</ td >
100+ < td > Logo to be displayed inside the footer.</ td >
87101 < td > -</ td >
88102 </ tr >
89103 < tr >
90104 < td >
91105 < DxcFlex direction = "column" gap = "var(--spacing-gap-xs)" alignItems = "baseline" >
92- < StatusBadge status = "new" />
93106 mode
94107 </ DxcFlex >
95108 </ td >
@@ -111,12 +124,23 @@ const sections = [
111124 < TableCode > 'default'</ TableCode >
112125 </ td >
113126 </ tr >
127+ < tr >
128+ < td >
129+ < DxcFlex direction = "column" gap = "var(--spacing-gap-xs)" alignItems = "baseline" >
130+ < StatusBadge status = "new" />
131+ rightContent
132+ </ DxcFlex >
133+ </ td >
134+ < td >
135+ < TableCode > ReactNode</ TableCode >
136+ </ td >
137+ < td > Content to be displayed on the right side of the footer before the socialLinks if provided.</ td >
138+ < td > -</ td >
139+ </ tr >
114140 < tr >
115141 < td > socialLinks</ td >
116142 < td >
117- < TableCode >
118- { `{ href: string; title: string; logo: string | (React.ReactNode & React.SVGProps <SVGSVGElement>); }[]` }
119- </ TableCode >
143+ < ExtendedTableCode > { socialLinkTypeString } </ ExtendedTableCode >
120144 </ td >
121145 < td >
122146 An array of objects representing the links that will be rendered as icons at the top-right side of the
@@ -148,7 +172,8 @@ const sections = [
148172 < TableCode > number</ TableCode >
149173 </ td >
150174 < td >
151- Value of the < Code > tabindex</ Code > for all interactive elements, except those inside the custom area.
175+ Value of the < Code > tabindex</ Code > for all interactive elements, except those inside the leftContent and
176+ rightContent.
152177 </ td >
153178 < td >
154179 < TableCode > 0</ TableCode >
@@ -158,29 +183,6 @@ const sections = [
158183 </ DxcTable >
159184 ) ,
160185 } ,
161- {
162- title : "Examples" ,
163- subSections : [
164- {
165- title : "Footer in application layout" ,
166- content : (
167- < iframe
168- src = "https://codesandbox.io/embed/rough-https-9oduyh?fontsize=14& hidenavigation = 1 & theme = dark "
169- style = { {
170- width : "100%" ,
171- minHeight : "500px" ,
172- border : "0" ,
173- borderRadius : "4px" ,
174- overflow : "hidden" ,
175- } }
176- title = "Footer and header"
177- allow = "accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
178- sandbox = "allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
179- />
180- ) ,
181- } ,
182- ] ,
183- } ,
184186] ;
185187
186188const FooterCodePage = ( ) => {
0 commit comments