Merge pull request #5
fix: all suggestions in a row should have the same height
This commit is contained in:
commit
836f0e701a
|
@ -3,6 +3,7 @@ import { Qualification } from 'libs/graphql';
|
||||||
import { QUESTIONS } from 'config/app';
|
import { QUESTIONS } from 'config/app';
|
||||||
import { Route } from 'config/routing';
|
import { Route } from 'config/routing';
|
||||||
|
|
||||||
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
|
@ -20,6 +21,8 @@ export interface SuggestionsProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Suggestions = ({ suggestions }: SuggestionsProps) => {
|
const Suggestions = ({ suggestions }: SuggestionsProps) => {
|
||||||
|
const classes = useStyles();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Section>
|
<Section>
|
||||||
<Container>
|
<Container>
|
||||||
|
@ -30,11 +33,12 @@ const Suggestions = ({ suggestions }: SuggestionsProps) => {
|
||||||
{suggestions.map(suggestion => {
|
{suggestions.map(suggestion => {
|
||||||
return (
|
return (
|
||||||
<Grid item xs={12} sm={6} md={4} key={suggestion.id}>
|
<Grid item xs={12} sm={6} md={4} key={suggestion.id}>
|
||||||
<Card>
|
<Card className={classes.card}>
|
||||||
<CardHeader
|
<CardHeader
|
||||||
title={suggestion.name}
|
title={suggestion.name}
|
||||||
subheader={suggestion.code}
|
subheader={suggestion.code}
|
||||||
/>
|
/>
|
||||||
|
<div className={classes.spacer} />
|
||||||
<CardActions>
|
<CardActions>
|
||||||
{QUESTIONS.map(limit => {
|
{QUESTIONS.map(limit => {
|
||||||
return (
|
return (
|
||||||
|
@ -68,4 +72,15 @@ const Suggestions = ({ suggestions }: SuggestionsProps) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const useStyles = makeStyles(() => ({
|
||||||
|
card: {
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
height: '100%',
|
||||||
|
},
|
||||||
|
spacer: {
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
export default Suggestions;
|
export default Suggestions;
|
||||||
|
|
Reference in New Issue
Block a user