Skip to content

Commit

Permalink
Merge pull request #41 from onap-sdc/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
ArielDKenan authored Feb 13, 2019
2 parents 43744fb + 799d417 commit 0eb910a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sdc-ui",
"version": "1.6.61",
"version": "1.6.62",
"description": "This project aims to create a unified UI styled components for multiple development teams who work on the same web-based applications.",
"scripts": {
"test": "jest && npm run karma-travis",
Expand Down
17 changes: 13 additions & 4 deletions src/react/ModalFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const Footer = ({
actionButtonText,
actionButtonClick,
withButtons,
children
children,
confirmDataTestId,
cancelDataTestId
}) => {
const closeBtnType = actionButtonClick ? 'secondary' : 'primary';
return (
Expand All @@ -17,11 +19,16 @@ const Footer = ({
{withButtons && (
<div>
{actionButtonClick && (
<Button onClick={actionButtonClick}>
<Button
onClick={actionButtonClick}
data-test-id={confirmDataTestId}>
{actionButtonText}
</Button>
)}
<Button btnType={closeBtnType} onClick={onClose}>
<Button
btnType={closeBtnType}
onClick={onClose}
data-test-id={cancelDataTestId}>
{closeButtonText}
</Button>
</div>
Expand All @@ -36,7 +43,9 @@ Footer.propTypes = {
actionButtonText: PropTypes.string,
actionButtonClick: PropTypes.func,
withButtons: PropTypes.bool,
children: PropTypes.node
children: PropTypes.node,
confirmDataTestId: PropTypes.string,
cancelDataTestId: PropTypes.string
};

Footer.defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions test/react/__snapshots__/ModalFooter.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`ModalFooter basic test 1`] = `
<div>
<button
className="sdc-button sdc-button__primary "
data-test-id={undefined}
disabled={false}
onClick={undefined}
>
Expand Down

0 comments on commit 0eb910a

Please sign in to comment.