Skip to content

Commit

Permalink
fix(frontend/settings): change import statement for button
Browse files Browse the repository at this point in the history
Button componenet from SettingsComponent should be used instead making a new button.
  • Loading branch information
saihaj committed May 11, 2020
1 parent bc63272 commit 66b25c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
9 changes: 0 additions & 9 deletions app/frontend/src/Settings/DynamicOptions.css

This file was deleted.

7 changes: 3 additions & 4 deletions app/frontend/src/Settings/DynamicOptions.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React, { useContext } from 'react'
import { string, shape, node, bool } from 'prop-types'

import { Typography, Grid, Button } from '@material-ui/core'
import { Typography, Grid } from '@material-ui/core'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'

import { OPTIONS, DEFAULT_OPTIONS, PRIVACY_TYPES, OPTION_GROUPS } from '../lib/options'
import controller from '../lib/controller'
import { SettingsContext } from '../lib/contexts'

import SettingComponentFactory from './SettingComponents'
import SettingComponentFactory, { Button } from './SettingComponents'

import './DynamicOptions.css'

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

0 comments on commit 66b25c6

Please sign in to comment.