This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/components/pages/repo-page/body.tsx

49 lines
1.4 KiB
TypeScript

import * as React from "react";
interface IBody {
description: string,
api: Object
}
/**
* The Component for the main body of the repo page
* @param {string} description - The description of the repository
* @param {object} api - The ApiService injected from Angular
*/
class body extends React.Component<IBody, {}> {
static propTypes = {
description: React.PropTypes.string.isRequired,
api: React.PropTypes.object.isRequired
}
render () {
let description: string = this.props.description;
if (description === null || description === "") {
description = "No Description";
}
return(
<div>
<ul className="nav nav-tabs rp-tabs">
<li className="active">
<a data-target="#tab1" data-toggle="tab">Description</a>
</li>
<li>
<a data-target="#tab2" data-toggle="tab">Automated Builds</a>
</li>
</ul>
<div className="panel-body rp-panelBody">
<div className="tab-content">
<div className="tab-pane in active" id="tab1">
<div className="rp-description">{description}</div>
</div>
<div className="tab-pane" id="tab2">
<h3 className="tab-header">Repository Builds</h3>
</div>
</div>
</div>
</div>
);
}
}
export default body;