Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Refactor Dialog with Aphrodite
Browse files Browse the repository at this point in the history
Closes #8984

Per 2dd92a9, dialog.less can be safely removed (as styles under 'menu' has been just copied).

Test Plan:
1. Open 'Import Browser Data...' from Bookmarks on the main menu
2. Open devtool
3. Make sure 'dialog' is styled properly
  • Loading branch information
Suguru Hirahara committed May 22, 2017
1 parent 184abe8 commit 3ba6110
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 87 deletions.
20 changes: 19 additions & 1 deletion app/renderer/components/common/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const KeyCodes = require('../../../common/constants/keyCodes')
// Utils
const cx = require('../../../../js/lib/classSet')

const {StyleSheet, css} = require('aphrodite/no-important')
const globalStyles = require('../styles/global')

/**
* Represents a popup dialog
*/
Expand All @@ -39,7 +42,7 @@ class Dialog extends ImmutableComponent {

render () {
return <div className={cx({
dialog: true,
[css(styles.dialog)]: true,
[this.props.className]: !!this.props.className
})}
data-test-id={this.props.testId}
Expand All @@ -64,4 +67,19 @@ Dialog.propTypes = {
onHide: PropTypes.func
}

const styles = StyleSheet.create({
dialog: {
position: 'absolute',
top: 0,
left: 0,
height: '100%',
width: '100%',
zIndex: globalStyles.zindex.zindexDialogs,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
background: 'rgba(0, 0, 0, 0.15)'
}
})

module.exports = Dialog
1 change: 0 additions & 1 deletion js/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ require('../less/forms.less')
require('../less/switchControls.less')
require('../less/tabs.less')
require('../less/findbar.less')
require('../less/dialogs.less')
require('../less/downloadBar.less')
require('../less/bookmarksToolbar.less')
require('../less/notificationBar.less')
Expand Down
85 changes: 0 additions & 85 deletions less/dialogs.less

This file was deleted.

0 comments on commit 3ba6110

Please sign in to comment.