diff --git a/app/extensions/brave/locales/en-US/styles.properties b/app/extensions/brave/locales/en-US/styles.properties index 74de9801d0..c293679908 100644 --- a/app/extensions/brave/locales/en-US/styles.properties +++ b/app/extensions/brave/locales/en-US/styles.properties @@ -15,10 +15,12 @@ offByDefault=Off by default buttons=Buttons browserButton=Browser Button -whiteButton=White Button +secondaryColor=Secondary Button inlineButton=Inline Button wideButton=Wide Button smallButton=Small Button -primaryButton=Primary Button +primaryColor=Primary Button actionButton=Action Button subtleButton=Subtle Button +extensionItem=Extension Item +notificationItem=Notification Item diff --git a/app/renderer/components/bookmarks/addEditBookmarkHanger.js b/app/renderer/components/bookmarks/addEditBookmarkHanger.js index fed7e9afd5..f8402ebd9e 100644 --- a/app/renderer/components/bookmarks/addEditBookmarkHanger.js +++ b/app/renderer/components/bookmarks/addEditBookmarkHanger.js @@ -7,7 +7,7 @@ const React = require('react') // Components const ImmutableComponent = require('../immutableComponent') const Dialog = require('../../../../js/components/dialog') -const Button = require('../../../../js/components/button') +const BrowserButton = require('../common/browserButton') // Actions const appActions = require('../../../../js/actions/appActions') @@ -273,18 +273,18 @@ class AddEditBookmarkHanger extends ImmutableComponent { { this.props.originalDetail - ? + } +} + +const styles = StyleSheet.create({ + browserButton: { + margin: '0 3px', + whiteSpace: 'nowrap', + outline: 'none', + cursor: 'default', + display: 'inline-block', + lineHeight: '25px', + height: '25px', + width: '25px', + fontSize: '13px', + color: globalStyles.button.default.color, + borderRadius: '2px', + textAlign: 'center', + transition: '.1s opacity, .1s background', + userSelect: 'none', + backgroundSize: '16px', + backgroundPosition: 'center center', + backgroundRepeat: 'no-repeat', + backgroundImage: 'none', + backgroundColor: globalStyles.button.default.backgroundColor, + border: 'none', + ':hover': { + color: globalStyles.button.default.hoverColor + } + }, + // applies for primary and white buttons + browserButton_default: { + position: 'relative', + boxShadow: globalStyles.button.default.boxShadow, + cursor: 'pointer', + lineHeight: 1.25, + width: 'auto', + height: 'auto', + minWidth: '78px', + fontSize: '13px', + padding: '7px 20px', + ':active': { + // push the button down when active + bottom: '-1px' + } + }, + browserButton_primaryColor: { + background: globalStyles.button.primary.background, + borderLeft: '2px solid transparent', + borderRight: '2px solid transparent', + borderTop: `2px solid ${globalStyles.button.primary.gradientColor1}`, + borderBottom: `2px solid ${globalStyles.button.primary.gradientColor2}`, + color: globalStyles.button.primary.color, + cursor: 'pointer', + ':hover': { + border: `2px solid ${globalStyles.button.primary.borderHoverColor}`, + color: globalStyles.button.primary.hoverColor + } + }, + browserButton_secondaryColor: { + background: globalStyles.button.secondary.background, + border: '1px solid white', + color: globalStyles.button.secondary.color, + cursor: 'pointer', + ':hover': { + border: `1px solid ${globalStyles.button.secondary.borderHoverColor}`, + color: globalStyles.button.secondary.hoverColor + } + }, + browserButton_extensionItem: { + WebkitAppRegion: 'no-drag', + backgroundSize: 'contain', + height: '17px', + margin: '4px 0 0 0', + opacity: '0.85', + backgroundRepeat: 'no-repeat' + }, + browserButton_groupedItem: { + // Legacy LESS inside ledger is too nested + // and this style won't have effect without using !important + // TODO: remove !important and check advancedSettings.js + // once preferences is fully refactored + marginRight: '4px !important', + marginLeft: '4px !important' + }, + browserButton_notificationItem: { + fontSize: '13px', + marginRight: '10px', + padding: '2px 15px', + textTransform: 'capitalize', + width: 'auto' + } +}) + +module.exports = BrowserButton diff --git a/app/renderer/components/common/messageBox.js b/app/renderer/components/common/messageBox.js index c3b6a2d67c..2d7062f0af 100644 --- a/app/renderer/components/common/messageBox.js +++ b/app/renderer/components/common/messageBox.js @@ -8,7 +8,7 @@ const {StyleSheet, css} = require('aphrodite') // Components const ReduxComponent = require('../reduxComponent') const Dialog = require('../../../../js/components/dialog') -const Button = require('../../../../js/components/button') +const BrowserButton = require('../common/browserButton') const SwitchControl = require('../../../../js/components/switchControl') // Actions @@ -88,8 +88,9 @@ class MessageBox extends React.Component { const newButtons = [] for (let index = (buttons.size - 1); index > -1; index--) { - newButtons.push(