summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/repository-grid/index.js2
-rw-r--r--src/components/repository-grid/styles.css4
-rw-r--r--src/components/top-nav/index.js51
-rw-r--r--src/components/top-nav/styles.css1
4 files changed, 55 insertions, 3 deletions
diff --git a/src/components/repository-grid/index.js b/src/components/repository-grid/index.js
index 8b9a276..78c8dfc 100644
--- a/src/components/repository-grid/index.js
+++ b/src/components/repository-grid/index.js
@@ -1,5 +1,7 @@
import React from 'react';
+
import GridItem from './grid-item';
+import './styles.css';
class RepositoryGrid extends React.Component {
render() {
diff --git a/src/components/repository-grid/styles.css b/src/components/repository-grid/styles.css
new file mode 100644
index 0000000..ddda54a
--- /dev/null
+++ b/src/components/repository-grid/styles.css
@@ -0,0 +1,4 @@
+.grid-container {
+ margin-top: 20px;
+ padding: 0 5px;
+}
diff --git a/src/components/top-nav/index.js b/src/components/top-nav/index.js
index 24f0747..7f36321 100644
--- a/src/components/top-nav/index.js
+++ b/src/components/top-nav/index.js
@@ -1,4 +1,7 @@
import React from 'react';
+import PropTypes from 'prop-types';
+import classNames from 'classnames';
+
import './styles.css';
const TopNav = (props) => (
@@ -12,12 +15,54 @@ const TopNav = (props) => (
</div>
</a>
<div className="float-right duration-btns">
- <a href="#" className="btn btn-primary">Weekly</a>
- <a href="#" className="btn btn-light">Monthly</a>
- <a href="#" className="btn btn-light">Daily</a>
+ <a href="javascript:void(0)"
+ onClick={ () => props.updateDateType('yearly') }
+ className={
+ classNames('btn', {
+ 'btn-primary': props.selectedDateType === 'yearly',
+ 'btn-light': props.selectedDateType !== 'yearly',
+ })
+ }>
+ Yearly
+ </a>
+ <a href="javascript:void(0)"
+ onClick={ () => props.updateDateType('monthly') }
+ className={
+ classNames('btn', {
+ 'btn-primary': props.selectedDateType === 'monthly',
+ 'btn-light': props.selectedDateType !== 'monthly',
+ })
+ }>
+ Monthly
+ </a>
+ <a href="javascript:void(0)"
+ onClick={ () => props.updateDateType('weekly') }
+ className={
+ classNames('btn', {
+ 'btn-primary': props.selectedDateType === 'weekly',
+ 'btn-light': props.selectedDateType !== 'weekly',
+ })
+ }>
+ Weekly
+ </a>
+ <a href="javascript:void(0)"
+ onClick={ () => props.updateDateType('daily') }
+ className={
+ classNames('btn', {
+ 'btn-primary': props.selectedDateType === 'daily',
+ 'btn-light': props.selectedDateType !== 'daily',
+ })
+ }>
+ Daily
+ </a>
</div>
</div>
</div>
);
+TopNav.propTypes = {
+ updateDateType: PropTypes.func.isRequired,
+ selectedDateType: PropTypes.string
+};
+
export default TopNav;
diff --git a/src/components/top-nav/styles.css b/src/components/top-nav/styles.css
index c91d753..15230f8 100644
--- a/src/components/top-nav/styles.css
+++ b/src/components/top-nav/styles.css
@@ -34,5 +34,6 @@
.duration-btns a.btn {
margin-left: 10px;
margin-top: 24px;
+ box-shadow: none;
}