File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
docs/src/pages/components/cdk-components/button Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ const buttonPropsTable = () => {
1616 </ td >
1717 < td > Uses on of the available button modes.</ td >
1818 </ tr >
19+ < tr >
20+ < td > type: 'button' | 'reset' | 'submit'</ td >
21+ < td >
22+ < code > 'button'</ code >
23+ </ td >
24+ < td > This prop corresponds to the 'type' prop of the button in html.</ td >
25+ </ tr >
1926 < tr >
2027 < td > label: string</ td >
2128 < td > </ td >
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const DxcButton = ({
1313 mode = "primary" ,
1414 disabled = false ,
1515 iconPosition = "before" ,
16+ type = "button" ,
1617 iconSrc = "" ,
1718 icon,
1819 onClick = "" ,
@@ -23,9 +24,10 @@ const DxcButton = ({
2324
2425 return (
2526 < ThemeProvider theme = { colorsTheme . button } >
26- < DxCButton margin = { margin } mode = { mode } disabled = { disabled } iconPosition = { iconPosition } size = { size } >
27+ < DxCButton type = { type } margin = { margin } mode = { mode } disabled = { disabled } iconPosition = { iconPosition } size = { size } >
2728 < Button
2829 disabled = { disabled }
30+ type = { type }
2931 disableRipple
3032 aria-disabled = { disabled ? true : false }
3133 onClick = { ( ) => {
@@ -231,11 +233,11 @@ DxcButton.propTypes = {
231233 label : PropTypes . string ,
232234 mode : PropTypes . oneOf ( [ "primary" , "secondary" , "text" ] ) ,
233235 disabled : PropTypes . bool ,
234- theme : PropTypes . oneOf ( [ "dark" , "light" ] ) ,
235236 iconPosition : PropTypes . oneOf ( [ "after" , "before" ] ) ,
236237 onClick : PropTypes . func ,
237238 iconSrc : PropTypes . string ,
238239 icon : PropTypes . oneOfType ( [ PropTypes . element , PropTypes . func ] ) ,
240+ type : PropTypes . oneOf ( [ "button" , "reset" , "submit" ] ) ,
239241} ;
240242
241243export default DxcButton ;
You can’t perform that action at this time.
0 commit comments