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

47 lines
1.3 KiB
TypeScript
Raw Normal View History

import * as React from "react";
2016-11-29 20:57:53 +00:00
interface IBody {
description: string
}
2016-11-29 20:57:53 +00:00
/**
* The Component for the main body of the repo page
* @param {string} description - The description of the repository
*/
class body extends React.Component<IBody, {}> {
static propTypes = {
description: React.PropTypes.string.isRequired,
}
render () {
2016-11-29 20:57:53 +00:00
let description: string = this.props.description;
if (description === null || description === "") {
2016-11-29 20:57:53 +00:00
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">
2016-11-29 20:57:53 +00:00
<div className="rp-description">{description}</div>
</div>
<div className="tab-pane" id="tab2">
TODO (IAN): Convert the build directives to angular components
</div>
</div>
</div>
</div>
);
}
}
2016-10-31 20:21:45 +00:00
export default body;