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

Commit 6f70a1c

Browse files
committed
Add panelItem prop to browserButton
Auditors: @luixxiul Close #9543
1 parent f214325 commit 6f70a1c

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

app/extensions/brave/locales/en-US/styles.properties

+1
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ actionButton=Action Button
2121
subtleButton=Subtle Button
2222
extensionItem=Extension Item
2323
notificationItem=Notification Item
24+
panelItem=Panel Item

app/renderer/components/common/browserButton.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class BrowserButton extends ImmutableComponent {
2121
this.props.groupedItem && styles.browserButton_groupedItem,
2222
this.props.notificationItem && styles.browserButton_notificationItem,
2323
this.props.iconOnly && styles.browserButton_iconOnly,
24+
this.props.panelItem && styles.browserButton_panelItem,
2425
// TODO: These are other button styles app-wise
2526
// that needs to be refactored and included in this file
2627
// .............................................
2728
// this.props.navItem && styles.browserButton_navItem,
28-
// this.props.panelItem && styles.browserButton_panelItem,
2929

3030
// note: this should be the last item so it can override other styles
3131
this.props.disabled && styles.browserButton_disabled
@@ -236,6 +236,10 @@ const styles = StyleSheet.create({
236236
background: globalStyles.button.action.backgroundColor
237237
},
238238

239+
browserButton_panelItem: {
240+
minWidth: '180px'
241+
},
242+
239243
browserButton_iconOnly: {
240244
display: 'flex',
241245
justifyContent: 'center',

app/renderer/components/preferences/payment/bitcoinDashboard.js

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class BitcoinDashboard extends ImmutableComponent {
9797
l10nId: 'add',
9898
testId: 'bitcoinPurchaseButton',
9999
primaryColor: true,
100+
panelItem: true,
100101
disabled: disabled
101102
}
102103
const hrefAttrs = {
@@ -195,6 +196,7 @@ class BitcoinDashboard extends ImmutableComponent {
195196
<a target='_blank' href={url}>
196197
<BrowserButton
197198
primaryColor
199+
panelItem
198200
testId='exchangePanelButton'
199201
l10nId={name}
200202
/>
@@ -219,6 +221,7 @@ class BitcoinDashboard extends ImmutableComponent {
219221
<a target='_blank' href='https://www.buybitcoinworldwide.com/'>
220222
<BrowserButton
221223
primaryColor
224+
panelItem
222225
testId='worldWidePanelButton'
223226
label='buybitcoinworldwide.com'
224227
/>
@@ -254,6 +257,7 @@ class BitcoinDashboard extends ImmutableComponent {
254257
<a href={ledgerData.get('paymentURL')} target='_blank'>
255258
<BrowserButton
256259
primaryColor
260+
panelItem
257261
l10nId='bitcoinVisitAccount'
258262
testId='bitcoinVisitAccountButton'
259263
/>
@@ -265,6 +269,7 @@ class BitcoinDashboard extends ImmutableComponent {
265269
<div className={css(styles.panel__divider_right__bitcoinPanel__walletAddressText)}>{ledgerData.get('address')}</div>
266270
<BrowserButton
267271
primaryColor
272+
panelItem
268273
l10nId='copyToClipboard'
269274
testId='copyToClipboardButton'
270275
onClick={this.copyToClipboard.bind(this, ledgerData.get('address'))}
@@ -295,6 +300,7 @@ class BitcoinDashboard extends ImmutableComponent {
295300
<div className={css(styles.panel__divider, styles.panel__divider_right)}>
296301
<BrowserButton
297302
primaryColor
303+
panelItem
298304
l10nId='displayQRCode'
299305
testId='displayQRCode'
300306
onClick={this.props.showQRcode.bind(this)}

js/about/styles.js

+7
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ class AboutStyle extends ImmutableComponent {
312312
&lt;BrowserButton iconOnly icon={'{'}globalStyles.appIcons.private{'}'} size='60px' color='red' />
313313
</Code></Pre>
314314

315+
<BrowserButton groupedItem primaryColor panelItem l10nId='panelItem' onClick={this.copyToClipboard} />
316+
<BrowserButton groupedItem primaryColor panelItem l10nId='panelItem' onClick={this.props.showQRcode} />
317+
<Pre><Code>
318+
&lt;BrowserButton groupedItem primaryColor panelItem l10nId='panelItem' onClick={'{this.copyToClipboard}'} />{'\n'}
319+
&lt;BrowserButton groupedItem primaryColor panelItem l10nId='panelItem' onClick={'{this.props.showQRcode}'} />
320+
</Code></Pre>
321+
315322
<GoTop />
316323
</div>
317324

0 commit comments

Comments
 (0)