-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tangle-dapp): Add
Unstake
action to LsMyPoolsTable
- Loading branch information
1 parent
131818b
commit 8d50504
Showing
6 changed files
with
152 additions
and
12 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,46 @@ | ||
import { IconBase } from '@webb-tools/icons/types'; | ||
import { | ||
IconButton, | ||
Tooltip, | ||
TooltipBody, | ||
TooltipTrigger, | ||
} from '@webb-tools/webb-ui-components'; | ||
import { FC, JSX } from 'react'; | ||
import { twMerge } from 'tailwind-merge'; | ||
|
||
export type BlueIconButtonProps = { | ||
onClick: () => unknown; | ||
tooltip: string; | ||
Icon: (props: IconBase) => JSX.Element; | ||
isDisabled?: boolean; | ||
}; | ||
|
||
const BlueIconButton: FC<BlueIconButtonProps> = ({ | ||
onClick, | ||
tooltip, | ||
Icon, | ||
isDisabled = false, | ||
}) => { | ||
return ( | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<IconButton | ||
onClick={onClick} | ||
className={twMerge( | ||
'bg-blue-10 hover:bg-blue-10 dark:bg-blue-120 dark:hover:bg-blue-110', | ||
isDisabled && | ||
'opacity-50 cursor-not-allowed dark:hover:bg-blue-120', | ||
)} | ||
> | ||
<Icon className="fill-blue-80 dark:fill-blue-50" size="md" /> | ||
</IconButton> | ||
</TooltipTrigger> | ||
|
||
<TooltipBody className="break-normal max-w-[250px] text-center"> | ||
{tooltip} | ||
</TooltipBody> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export default BlueIconButton; |
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,9 @@ | ||
import { useActiveAccount } from '@webb-tools/api-provider-environment/WebbProvider/subjects'; | ||
|
||
const useIsAccountConnected = (): boolean => { | ||
const [activeAccount] = useActiveAccount(); | ||
|
||
return activeAccount?.address !== undefined; | ||
}; | ||
|
||
export default useIsAccountConnected; |
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,10 @@ | ||
import { createIcon } from './create-icon'; | ||
import { IconBase } from './types'; | ||
|
||
export const SubtractCircleLineIcon = (props: IconBase) => { | ||
return createIcon({ | ||
...props, | ||
d: 'M7.00065 14.1654C3.31875 14.1654 0.333984 11.1806 0.333984 7.4987C0.333984 3.8168 3.31875 0.832031 7.00065 0.832031C10.6825 0.832031 13.6673 3.8168 13.6673 7.4987C13.6673 11.1806 10.6825 14.1654 7.00065 14.1654ZM7.00065 12.832C9.94619 12.832 12.334 10.4442 12.334 7.4987C12.334 4.55318 9.94619 2.16536 7.00065 2.16536C4.05513 2.16536 1.66732 4.55318 1.66732 7.4987C1.66732 10.4442 4.05513 12.832 7.00065 12.832ZM3.66732 6.83203H10.334V8.16536H3.66732V6.83203Z', | ||
displayName: 'SubtractCircleLineIcon', | ||
}); | ||
}; |
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