Skip to content

Commit fdf047b

Browse files
feat(About): add ability to use product title image
1 parent 3071941 commit fdf047b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/AboutModal/AboutModal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ AboutModal.propTypes = {
5151
show: PropTypes.bool.isRequired,
5252
/** Function to call when modal is closed */
5353
onHide: PropTypes.func.isRequired,
54-
/** Text to show for the product title */
55-
productTitle: PropTypes.string,
54+
/** Text or Element to show for the product title */
55+
productTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
5656
/** Image Source for the Product logo */
5757
logo: PropTypes.string,
5858
/** Alternate text if invalid logo */

src/components/AboutModal/__mocks__/mockAboutModal.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { Button } from '../../Button';
33
import { AboutModal } from '../index';
44
import logo from 'patternfly/dist/img/logo-alt.svg';
5+
import productTitle from 'patternfly/dist/img/brand-alt.svg';
56

67
export class MockAboutModal extends React.Component {
78
constructor() {
@@ -26,7 +27,7 @@ export class MockAboutModal extends React.Component {
2627
<AboutModal
2728
show={this.state.showModal}
2829
onHide={this.close}
29-
productTitle="Product Title"
30+
productTitle={<img src={productTitle} alt="Product Title" />}
3031
logo={logo}
3132
altLogo="Patternfly Logo"
3233
trademarkText="Trademark and Copyright Information"

0 commit comments

Comments
 (0)