@@ -3,7 +3,6 @@ import Code from "@/common/Code";
33import DocFooter from "@/common/DocFooter" ;
44import QuickNavContainer from "@/common/QuickNavContainer" ;
55import QuickNavContainerLayout from "@/common/QuickNavContainerLayout" ;
6- import StatusBadge from "@/common/StatusBadge" ;
76import Example from "@/common/example/Example" ;
87import basicUsage from "./examples/basicUsage" ;
98import semantic from "./examples/semantic" ;
@@ -26,63 +25,13 @@ const sections = [
2625 </ thead >
2726 < tbody >
2827 < tr >
29- < td > label</ td >
30- < td >
31- < TableCode > string</ TableCode >
32- </ td >
33- < td > Text to be placed in the button.</ td >
34- < td > -</ td >
35- </ tr >
36- < tr >
37- < td > mode</ td >
38- < td >
39- < TableCode > 'primary' | 'secondary' | 'tertiary'</ TableCode >
40- </ td >
41- < td > The available button modes.</ td >
42- < td >
43- < TableCode > 'primary'</ TableCode >
44- </ td >
45- </ tr >
46- < tr >
47- < td >
48- < DxcFlex direction = "column" gap = "0.25rem" alignItems = "baseline" >
49- < StatusBadge status = "new" />
50- semantic
51- </ DxcFlex >
52- </ td >
53- < td >
54- < TableCode > 'default' | 'error' | 'warning' | 'success' | 'info'</ TableCode >
55- </ td >
56- < td > Specifies the semantic meaning of the buttons, which determines its color.</ td >
57- < td >
58- < TableCode > 'default'</ TableCode >
59- </ td >
60- </ tr >
61- < tr >
62- < td > title</ td >
63- < td >
64- < TableCode > string</ TableCode >
65- </ td >
66- < td >
67- Text representing advisory information related to the button's action. Under the hood, this prop also
68- serves as an accessible label for the component.
69- </ td >
70- < td > -</ td >
71- </ tr >
72- < tr >
73- < td > type</ td >
74- < td >
75- < TableCode > 'button' | 'reset' | 'submit'</ TableCode >
76- </ td >
28+ < td > disabled</ td >
7729 < td >
78- Sets the < Code > type</ Code > attribute of the < abbr > HTML</ abbr > button element. See{ " " }
79- < DxcLink newWindow href = "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attributes" >
80- MDN
81- </ DxcLink > { " " }
82- for further information.
30+ < TableCode > boolean</ TableCode >
8331 </ td >
32+ < td > If true, the component will be disabled.</ td >
8433 < td >
85- < TableCode > 'button' </ TableCode >
34+ < TableCode > false </ TableCode >
8635 </ td >
8736 </ tr >
8837 < tr >
@@ -111,13 +60,32 @@ const sections = [
11160 </ td >
11261 </ tr >
11362 < tr >
114- < td > disabled </ td >
63+ < td > label </ td >
11564 < td >
116- < TableCode > boolean </ TableCode >
65+ < TableCode > string </ TableCode >
11766 </ td >
118- < td > If true, the component will be disabled.</ td >
67+ < td > Text to be placed in the button.</ td >
68+ < td > -</ td >
69+ </ tr >
70+ < tr >
71+ < td > margin</ td >
11972 < td >
120- < TableCode > false</ TableCode >
73+ < TableCode > 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | Margin</ TableCode >
74+ </ td >
75+ < td >
76+ Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
77+ 'right' properties in order to specify different margin sizes.
78+ </ td >
79+ < td > -</ td >
80+ </ tr >
81+ < tr >
82+ < td > mode</ td >
83+ < td >
84+ < TableCode > 'primary' | 'secondary' | 'tertiary'</ TableCode >
85+ </ td >
86+ < td > The available button modes.</ td >
87+ < td >
88+ < TableCode > 'primary'</ TableCode >
12189 </ td >
12290 </ tr >
12391 < tr >
@@ -129,23 +97,17 @@ const sections = [
12997 < td > -</ td >
13098 </ tr >
13199 < tr >
132- < td > margin </ td >
100+ < td > semantic </ td >
133101 < td >
134- < TableCode > 'xxsmall ' | 'xsmall ' | 'small ' | 'medium ' | 'large' | 'xlarge' | 'xxlarge' | Margin </ TableCode >
102+ < TableCode > 'default ' | 'error ' | 'warning ' | 'success ' | 'info' </ TableCode >
135103 </ td >
104+ < td > Specifies the semantic meaning of the buttons, which determines its color.</ td >
136105 < td >
137- Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
138- 'right' properties in order to specify different margin sizes.
106+ < TableCode > 'default'</ TableCode >
139107 </ td >
140- < td > -</ td >
141108 </ tr >
142109 < tr >
143- < td >
144- < DxcFlex direction = "column" gap = "0.25rem" alignItems = "baseline" >
145- < StatusBadge status = "new" />
146- size
147- </ DxcFlex >
148- </ td >
110+ < td > size</ td >
149111 < td >
150112 < TableCode >
151113 {
@@ -170,6 +132,33 @@ const sections = [
170132 < TableCode > 0</ TableCode >
171133 </ td >
172134 </ tr >
135+ < tr >
136+ < td > title</ td >
137+ < td >
138+ < TableCode > string</ TableCode >
139+ </ td >
140+ < td >
141+ Text representing advisory information related to the button's action. Under the hood, this prop also
142+ serves as an accessible label for the component.
143+ </ td >
144+ < td > -</ td >
145+ </ tr >
146+ < tr >
147+ < td > type</ td >
148+ < td >
149+ < TableCode > 'button' | 'reset' | 'submit'</ TableCode >
150+ </ td >
151+ < td >
152+ Sets the < Code > type</ Code > attribute of the < abbr > HTML</ abbr > button element. See{ " " }
153+ < DxcLink newWindow href = "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attributes" >
154+ MDN
155+ </ DxcLink > { " " }
156+ for further information.
157+ </ td >
158+ < td >
159+ < TableCode > 'button'</ TableCode >
160+ </ td >
161+ </ tr >
173162 </ tbody >
174163 </ DxcTable >
175164 ) ,
@@ -181,14 +170,14 @@ const sections = [
181170 title : "Basic usage" ,
182171 content : < Example example = { basicUsage } defaultIsVisible /> ,
183172 } ,
184- {
185- title : "Semantic" ,
186- content : < Example example = { semantic } defaultIsVisible /> ,
187- } ,
188173 {
189174 title : "Icons" ,
190175 content : < Example example = { icons } defaultIsVisible /> ,
191176 } ,
177+ {
178+ title : "Semantic" ,
179+ content : < Example example = { semantic } defaultIsVisible /> ,
180+ } ,
192181 {
193182 title : "Size" ,
194183 content : < Example example = { sizes } defaultIsVisible /> ,
@@ -197,15 +186,13 @@ const sections = [
197186 } ,
198187] ;
199188
200- const ButtonCodePage = ( ) => {
201- return (
202- < DxcFlex direction = "column" gap = "4rem" >
203- < QuickNavContainerLayout >
204- < QuickNavContainer sections = { sections } startHeadingLevel = { 2 } > </ QuickNavContainer >
205- </ QuickNavContainerLayout >
206- < DocFooter githubLink = "https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/button/code/ButtonCodePage.tsx" />
207- </ DxcFlex >
208- ) ;
209- } ;
189+ const ButtonCodePage = ( ) => (
190+ < DxcFlex direction = "column" gap = "4rem" >
191+ < QuickNavContainerLayout >
192+ < QuickNavContainer sections = { sections } startHeadingLevel = { 2 } />
193+ </ QuickNavContainerLayout >
194+ < DocFooter githubLink = "https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/button/code/ButtonCodePage.tsx" />
195+ </ DxcFlex >
196+ ) ;
210197
211198export default ButtonCodePage ;
0 commit comments