Skip to content

Commit

Permalink
fix(frontend/settings): match reset button style
Browse files Browse the repository at this point in the history
Uses theme variable colors for styling.

Fixes #432
  • Loading branch information
saihaj committed May 8, 2020
1 parent 615405b commit d630575
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app/frontend/src/Settings/DynamicOptions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.reset-to-defaults-button{
color: var(--settings-text-color) !important;
background-color: var(--settings-setting-off-color) !important;
}

.reset-to-defaults-button:hover {
color: var(--settings-background-color) !important;
background-color: var(--settings-setting-on-color) !important;
}
4 changes: 3 additions & 1 deletion app/frontend/src/Settings/DynamicOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { SettingsContext } from '../lib/contexts'

import SettingComponentFactory from './SettingComponents'

import './DynamicOptions.css'

export const slotSizes = {
icon: { xs: 2, sm: 1 },
name: { xs: 5, sm: 5, md: 4, lg: 4 },
Expand Down Expand Up @@ -48,7 +50,7 @@ OptionSlot.propTypes = { children: node.isRequired }
export const ResetButton = ( { group, disabled } ) => (
<OptionGrid container align="center">
<Grid item {...slotSizes.single}>
<Button disabled={disabled} variant="contained" onClick={() => controller.resetSettingGroup( group )}>Reset to defaults</Button>
<Button className="reset-to-defaults-button" disabled={disabled} variant="contained" onClick={() => controller.resetSettingGroup( group )}>Reset to defaults</Button>
</Grid>
</OptionGrid>
)
Expand Down

0 comments on commit d630575

Please sign in to comment.