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

Refactor Dialog with Aphrodite #8985

Merged
merged 1 commit into from
May 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.