-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cancel transaction, ref #LEA-958
- Loading branch information
1 parent
399b185
commit 5d797f7
Showing
25 changed files
with
1,519 additions
and
1,025 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
70 changes: 70 additions & 0 deletions
70
src/app/components/stacks-transaction-item/stacks-transaction-action-menu.tsx
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,70 @@ | ||
import { ActivitySelectors } from '@tests/selectors/activity.selectors'; | ||
import { css } from 'leather-styles/css'; | ||
import { HStack, styled } from 'leather-styles/jsx'; | ||
|
||
import { ChevronDownIcon, ChevronsRightIcon, CloseIcon, DropdownMenu, Flag } from '@leather.io/ui'; | ||
|
||
interface Props { | ||
onIncreaseFee(): void; | ||
onCancelTransaction(): void; | ||
} | ||
|
||
export function StacksTransactionActionMenu({ onIncreaseFee, onCancelTransaction }: Props) { | ||
return ( | ||
<DropdownMenu.Root> | ||
<DropdownMenu.Trigger | ||
data-testid={ActivitySelectors.ActivityItemMenuBtn} | ||
className={css({ | ||
zIndex: 10, | ||
borderRadius: 'sm', | ||
px: 'space.01', | ||
_hover: { | ||
background: 'ink.component-background-hover', | ||
}, | ||
})} | ||
> | ||
<Flag spacing="space.02" reverse img={<ChevronDownIcon variant="small" />}> | ||
<styled.span textStyle="label.03">Options</styled.span> | ||
</Flag> | ||
</DropdownMenu.Trigger> | ||
<DropdownMenu.Portal> | ||
<DropdownMenu.Content | ||
align="end" | ||
side="bottom" | ||
sideOffset={8} | ||
className={css({ | ||
zIndex: 100, | ||
width: 'settingsMenuWidth', | ||
})} | ||
> | ||
<DropdownMenu.Group> | ||
<DropdownMenu.Item | ||
data-testid={ActivitySelectors.ActivityItemMenuIncreaseFee} | ||
onClick={e => { | ||
e.stopPropagation(); | ||
onIncreaseFee(); | ||
}} | ||
> | ||
<HStack> | ||
<ChevronsRightIcon /> | ||
<styled.span textStyle="label.02">Increase fee</styled.span> | ||
</HStack> | ||
</DropdownMenu.Item> | ||
<DropdownMenu.Item | ||
data-testid={ActivitySelectors.ActivityItemMenuCancelTransaction} | ||
onClick={e => { | ||
e.stopPropagation(); | ||
onCancelTransaction(); | ||
}} | ||
> | ||
<HStack> | ||
<CloseIcon /> | ||
<styled.span textStyle="label.02">Cancel transaction</styled.span> | ||
</HStack> | ||
</DropdownMenu.Item> | ||
</DropdownMenu.Group> | ||
</DropdownMenu.Content> | ||
</DropdownMenu.Portal> | ||
</DropdownMenu.Root> | ||
); | ||
} |
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
40 changes: 0 additions & 40 deletions
40
src/app/features/dialogs/increase-fee-dialog/components/increase-fee-actions.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.