Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/yellow-books-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@relayprotocol/relay-kit-ui': patch
---

Fix share icon color
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type FC } from 'react'
import { useContext, type FC } from 'react'
import {
Box,
Button,
Expand All @@ -25,6 +25,7 @@ import { formatBN } from '../../../../utils/numbers.js'
import { TransactionsByChain } from './TransactionsByChain.js'
import { faArrowRight } from '@fortawesome/free-solid-svg-icons'
import { XIcon } from '../../../../icons/index.js'
import { ProviderOptionsContext } from '../../../../providers/RelayKitProvider.js'

type SwapSuccessStepProps = {
fromToken?: Token
Expand Down Expand Up @@ -64,6 +65,7 @@ export const SwapSuccessStep: FC<SwapSuccessStepProps> = ({
const relayClient = useRelayClient()
const isWrap = details?.operation === 'wrap'
const isUnwrap = details?.operation === 'unwrap'
const providerOptionsContext = useContext(ProviderOptionsContext)

const _fromAmountFormatted = transaction?.data?.metadata?.currencyIn?.amount
? formatBN(
Expand Down Expand Up @@ -125,6 +127,8 @@ export const SwapSuccessStep: FC<SwapSuccessStepProps> = ({

const showDetails =
!allTxHashes.every((tx) => tx.isBatchTx) || formattedGasTopUpAmount
const shareIconFill =
providerOptionsContext.themeScheme === 'dark' ? '#fff' : '#000'

return isDelayedTx ? (
<>
Expand Down Expand Up @@ -446,7 +450,7 @@ export const SwapSuccessStep: FC<SwapSuccessStepProps> = ({
ml: 'auto'
}}
>
Share on <XIcon width={14} height={14} />
Share on <XIcon width={14} height={14} fill={shareIconFill} />
</Anchor>
</Flex>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/icons/XIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const XIcon = ({
<g clip-path="url(#clip0_690_7509)">
<path
d="M12.449 0.5H14.8134L9.64897 6.44222L15.7467 14.5H10.9556L7.22231 9.61556L2.92897 14.5H0.564529L6.10231 8.15333L0.253418 0.5H5.16897L8.56008 4.98L12.449 0.5ZM11.609 13.0689H12.9156L4.45342 1.83778H3.02231L11.609 13.0689Z"
fill="#11181C"
fill={fill}
/>
</g>
<defs>
Expand Down