import PropTypes from 'prop-types'; import React, { Component } from 'react'; import classnames from 'classnames'; import SiteOrigin from '../../ui/site-origin'; import Box from '../../ui/box'; import { FLEX_DIRECTION, JustifyContent, } from '../../../helpers/constants/design-system'; export default class PermissionsConnectHeader extends Component { static propTypes = { className: PropTypes.string, iconUrl: PropTypes.string, iconName: PropTypes.string.isRequired, siteOrigin: PropTypes.string.isRequired, headerTitle: PropTypes.node, boxProps: PropTypes.shape({ ...Box.propTypes }), headerText: PropTypes.string, leftIcon: PropTypes.node, rightIcon: PropTypes.node, }; static defaultProps = { iconUrl: null, headerTitle: '', headerText: '', boxProps: {}, }; renderHeaderIcon() { const { iconUrl, iconName, siteOrigin, leftIcon, rightIcon } = this.props; return (
); } render() { const { boxProps, className, headerTitle, headerText } = this.props; return ( {this.renderHeaderIcon()}
{headerTitle}
{headerText}
); } }