Skip to content

Commit

Permalink
refactor: cleanup ExportStrongholdButton (#7250)
Browse files Browse the repository at this point in the history
* refactor: cleanup component

* refactor: rename props

---------

Co-authored-by: Jean Carlo Noguera <[email protected]>
Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
  • Loading branch information
3 people authored Aug 19, 2023
1 parent f8df16f commit 26f947a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<Button outline classes="w-1/2" onClick={onCancelClick} disabled={busy}>
{localize('actions.cancel')}
</Button>
<ExportStrongholdButton showNotification overrideTitle={localize('actions.backup')} classes="w-1/2" />
<ExportStrongholdButton showNotification title={localize('actions.backup')} classes="w-1/2" />
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { ExportStrongholdButton, Spinner, Text, TextType } from 'shared/components'
import { localize } from '@core/i18n'
let isBusy = false
let isBusy: boolean = false
let message: string = ''
</script>

Expand Down
12 changes: 6 additions & 6 deletions packages/shared/components/buttons/ExportStrongholdButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import { openPopup, PopupId } from '@auxiliary/popup'
import { Button, ButtonSize } from 'shared/components'
export let isBusy = false
export let message = ''
export let showNotification = false
export let overrideTitle = ''
export let isBusy: boolean = false
export let message: string = ''
export let showNotification: boolean = false
export let title: string = ''
function handleExportStrongholdResponse(cancelled, error): void {
function handleExportStrongholdResponse(cancelled: boolean, error: string | undefined): void {
setTimeout(
() => {
message = ''
Expand Down Expand Up @@ -63,5 +63,5 @@
disabled={isBusy}
{...$$restProps}
>
{overrideTitle || localize('actions.export')}
{title || localize('actions.export')}
</Button>

0 comments on commit 26f947a

Please sign in to comment.