-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a common Card component for bridge process
The main card of the bridge process details looks the same so here we extrarct a component to a separate file which sets the same styles when the bridge process is completed.
- Loading branch information
1 parent
50d01bf
commit 40d4a30
Showing
3 changed files
with
37 additions
and
29 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
25 changes: 25 additions & 0 deletions
25
src/pages/tBTC/Bridge/components/BridgeProcessDetailsCard.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,25 @@ | ||
import { FC, ComponentProps } from "react" | ||
import { Card } from "@threshold-network/components" | ||
import backroundImage from "../../../../static/images/minting-completed-card-bg.png" | ||
|
||
type BridgeProcessDetailsCardProps = ComponentProps<typeof Card> & { | ||
isProcessCompleted: boolean | ||
} | ||
|
||
const processCompletedStyles = { | ||
backgroundImage: backroundImage, | ||
backgroundPosition: "bottom -10px right", | ||
backgroundRepeat: "no-repeat", | ||
} | ||
|
||
export const BridgeProcessDetailsCard: FC<BridgeProcessDetailsCardProps> = ({ | ||
isProcessCompleted, | ||
children, | ||
...restPros | ||
}) => { | ||
return ( | ||
<Card {...(isProcessCompleted ? processCompletedStyles : {})} {...restPros}> | ||
{children} | ||
</Card> | ||
) | ||
} |