Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Commit

Permalink
Add disabled Cards
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrohee committed Mar 27, 2017
1 parent c32e622 commit 738e61c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
18 changes: 18 additions & 0 deletions client/src/components/pepite/Card.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.card-background {
text-align: center;
}

.card-icon {
font-size: 3em;
}

.panel.panel-disabled {
border-color: #ecf0f1;
cursor: not-allowed;
}

.panel-disabled > .panel-heading {
color: #798d8f;
background-color: #ecf0f1;
border-color: #ecf0f1;
}
12 changes: 8 additions & 4 deletions client/src/components/pepite/Card.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React, { PropTypes } from 'react'
import './Card.css'

const Card = ({ title, glyphicon, isDisabled }) => {
const panelType = isDisabled ? 'panel-disabled' : 'panel-primary'

const Card = ({ title, glyphicon }) => {
return (
<div className="panel panel-primary">
<div className="panel-heading">
<div className={`panel ${panelType}`}>
<div className="panel-heading card-background">
<h2 className="card-title">
{title}
</h2>
Expand All @@ -17,7 +20,8 @@ const Card = ({ title, glyphicon }) => {

Card.propTypes = {
title: PropTypes.string.isRequired,
glyphicon: PropTypes.string.isRequired
glyphicon: PropTypes.string.isRequired,
isDisabled: PropTypes.bool
}

export default Card
14 changes: 13 additions & 1 deletion client/src/components/pepite/PepiteHomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ export class PepiteHomePage extends React.Component {
return (
<div className="container back-content">
<div className="row">
<Link to="pepite/applicant">
<Link className="col-md-6" to="pepite/applicant">
<Card title="Mes Candidats" glyphicon="glyphicon glyphicon-envelope" />
</Link>
<div className="col-md-6" title="bientôt disponible">
<Card title="Ma promotion" glyphicon="glyphicon glyphicon-education" isDisabled />
</div>
<div className="col-md-6" title="bientôt disponible">
<Card title="Mon Compte" glyphicon="glyphicon glyphicon-cog" isDisabled />
</div>
<div className="col-md-6" title="bientôt disponible">
<Card title="Mes prochains comités" glyphicon="glyphicon glyphicon-calendar" isDisabled />
</div>
<div className="col-md-6" title="bientôt disponible">
<Card title="Stats" glyphicon="glyphicon glyphicon-stats" isDisabled />
</div>
</div>
</div>
)
Expand Down

0 comments on commit 738e61c

Please sign in to comment.