This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update commonForm components based on FlyoutDialog Addresses #7114 Closes #10977 Auditors: @cezaraugusto @bsclifton Test Plan 1. Open about:styles 2. Click `commonForms` 3. Make sure the common form dialog is properly styled
- Loading branch information
1 parent
33bef11
commit 32dca6f
Showing
7 changed files
with
89 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
const React = require('react') | ||
const ImmutableComponent = require('../immutableComponent') | ||
|
||
const {StyleSheet, css} = require('aphrodite/no-important') | ||
const globalStyles = require('../styles/global') | ||
|
||
class FlyoutDialog extends ImmutableComponent { | ||
render () { | ||
return <div | ||
data-l10n-id={this.props.l10nId} | ||
data-test-id={this.props.testId} | ||
onKeyDown={this.props.onKeyDown} | ||
onClick={this.props.onClick} | ||
className={css(styles.flyoutDialog, this.props.custom)} | ||
> | ||
{this.props.children} | ||
</div> | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
flyoutDialog: { | ||
background: globalStyles.color.toolbarBackground, | ||
borderRadius: globalStyles.radius.borderRadius, | ||
boxShadow: globalStyles.shadow.flyoutDialogBoxShadow, | ||
color: '#000', | ||
fontSize: '13px', | ||
|
||
// Issue #7949 | ||
padding: `${globalStyles.spacing.dialogInsideMargin} 30px`, | ||
position: 'absolute', | ||
top: globalStyles.spacing.dialogTopOffset, | ||
|
||
// Issue #7930 | ||
boxSizing: 'border-box', | ||
maxWidth: '600px', | ||
maxHeight: `calc(80vh - ${globalStyles.spacing.downloadsBarHeight})` | ||
} | ||
}) | ||
|
||
module.exports = FlyoutDialog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters