mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-12 01:17:04 +02:00
This feature enables overrides of certain UI elements from the API such as setting a different background color for the header. This will make it easier to customise the UI in different environemnt.
31 lines
858 B
JavaScript
31 lines
858 B
JavaScript
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { FooterSection } from 'react-mdl';
|
|
|
|
class ShowApiDetailsComponent extends Component {
|
|
static propTypes = {
|
|
apiDetails: PropTypes.object.isRequired,
|
|
uiConfig: PropTypes.object.isRequired,
|
|
fetchAll: PropTypes.func.isRequired,
|
|
};
|
|
|
|
componentDidMount() {
|
|
this.props.fetchAll();
|
|
}
|
|
|
|
render() {
|
|
const version = this.props.apiDetails.version || '';
|
|
const { slogan, environment } = this.props.uiConfig;
|
|
|
|
return (
|
|
<FooterSection type="bottom" logo={`Unleash ${version}`}>
|
|
<small>{environment ? `(${environment})` : ''}</small>
|
|
<br />
|
|
<small>{slogan}</small>
|
|
</FooterSection>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ShowApiDetailsComponent;
|