Skip to content

Commit e1f5df2

Browse files
committed
fix(pf4): use link variant for cancel button
1 parent 4fc53e3 commit e1f5df2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/pf4-component-mapper/src/form-fields/layout-components.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { Button } from '@patternfly/react-core/dist/js/components/Button/Button'
1010

1111
import './layout-components-styles.scss';
1212

13-
const ButtonLayout = ({ label, bsStyle, children, disabled, ...props }) =>
14-
<Button variant={ bsStyle || 'secondary' } isDisabled={ disabled } { ...props }>
13+
const ButtonLayout = ({ label, bsStyle, children, disabled, buttonType, ...props }) =>
14+
<Button variant={ buttonType === 'cancel' ? 'link' : bsStyle || 'secondary' } isDisabled={ disabled } { ...props }>
1515
{ label }{ children }
1616
</Button>;
1717

@@ -23,6 +23,7 @@ ButtonLayout.propTypes = {
2323
PropTypes.arrayOf(PropTypes.node),
2424
PropTypes.node,
2525
]),
26+
buttonType: PropTypes.string,
2627
};
2728

2829
const ButtonGroupLayout = ({ children, ...props }) =>

0 commit comments

Comments
 (0)