1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-12 01:17:04 +02:00
unleash.unleash/frontend/src/component/api/show-api-details-component.jsx
ivaosthu c4900262f2 feat: Customisable UI via config
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.
2019-03-13 08:49:50 +01:00

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;