Skip to content

Commit

Permalink
Merge pull request #901 from hackforla/890-FRONT-gaps
Browse files Browse the repository at this point in the history
Added gaps and borderRadius to the theme
  • Loading branch information
adamkendis authored Jan 22, 2021
2 parents 2836fa9 + ca89360 commit 6a46224
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 24 deletions.
28 changes: 9 additions & 19 deletions client/components/FilterMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ const useStyles = makeStyles(theme => ({
position: 'absolute',
left: 35,
top: 75,
borderRadius: 10,
borderRadius: theme.borderRadius.md,
zIndex: 2000,
},
header: {
color: theme.palette.text.cyan,
padding: 5,
padding: theme.gaps.xs,
paddingRight: 0,
},
headerAction: {
margin: 'auto',
},
headerTitle: {
marginLeft: 10,
marginLeft: theme.gaps.xs,
fontSize: 20,
fontWeight: 600,
letterSpacing: '2px',
},
button: {
padding: 5,
padding: theme.gaps.xs,
paddingRight: 0,
color: theme.palette.text.dark,
'&:hover': {
Expand All @@ -51,9 +51,7 @@ const useStyles = makeStyles(theme => ({
},
}));

const FilterMenu = ({
toggleMenu,
}) => {
const FilterMenu = ({ toggleMenu }) => {
const [expanded, setExpanded] = useState(false);
const classes = useStyles();

Expand All @@ -67,14 +65,8 @@ const FilterMenu = ({
}}
title={(
<>
<GearButton
aria-label="toggle map menu"
onClick={toggleMenu}
/>
<Typography
className={classes.headerTitle}
component="span"
>
<GearButton aria-label="toggle map menu" onClick={toggleMenu} />
<Typography className={classes.headerTitle} component="span">
FILTERS
</Typography>
</>
Expand All @@ -87,14 +79,12 @@ const FilterMenu = ({
disableFocusRipple
disableRipple
>
{expanded ? <ArrowDropUpIcon /> : <ArrowDropDownIcon /> }
{expanded ? <ArrowDropUpIcon /> : <ArrowDropDownIcon />}
</IconButton>
)}
/>
<Collapse in={expanded}>
<CardContent>
TODO: Selectors
</CardContent>
<CardContent>TODO: Selectors</CardContent>
</Collapse>
</Card>
);
Expand Down
6 changes: 6 additions & 0 deletions client/theme/borderRadius.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
sm: 5,
md: 10,
lg: 70,
round: '50%',
};
2 changes: 1 addition & 1 deletion client/theme/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const colorSecondaryDark = '#0F181F';
export const colorSecondaryFocus = '#87C8BC';
export const colorTextPrimaryDark = '#0F181F';
export const colorTextPrimaryLight = '#FFFFFF';
export const colorTextSecondaryDark = '#0F181F';
export const colorTextSecondaryDark = '#A8A8A8';
export const colorTextSecondaryLight = '#ECECEC';
export const colorTextFocus = '#87C8BC';

Expand Down
7 changes: 7 additions & 0 deletions client/theme/gaps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
xs: 5,
sm: 10,
md: 15,
lg: 20,
xl: 30,
};
17 changes: 13 additions & 4 deletions client/theme/theme.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
import { createMuiTheme } from '@material-ui/core/styles';
import { colorPrimaryFocus } from './colors';
import {
colorPrimaryFocus,
colorPrimaryDark,
colorTextSecondaryDark,
colorSecondaryFocus,
} from './colors';
import gaps from './gaps';
import borderRadius from './borderRadius';

const theme = createMuiTheme({
gaps,
borderRadius,
palette: {
type: 'dark',
primary: {
main: '#29404F',
main: colorPrimaryDark,
dark: '#192730',
focus: colorPrimaryFocus,
},
secondary: {
main: '#0F181F',
main: colorTextSecondaryDark,
},
background: {
default: '#1A1A1A',
},
text: {
dark: '#C4C4C4',
cyan: '#87C8BC',
cyan: colorSecondaryFocus,
},
},
header: {
Expand Down

0 comments on commit 6a46224

Please sign in to comment.