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
1 change: 1 addition & 0 deletions .changelog/2412.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update LayerPicker icons
5 changes: 2 additions & 3 deletions src/app/components/LayerStatus/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import { CircleCheck, CircleX } from 'lucide-react'
import { Tooltip } from '@oasisprotocol/ui-library/src/components/tooltip'

type LayerStatusProps = {
Expand All @@ -14,14 +13,14 @@ type LayerStatusIconProps = {

const OutOfDateLayerStatusIcon: FC<LayerStatusIconProps> = ({ tooltip }) => {
const { t } = useTranslation()
const errorIcon = <CircleX size={16} className="stroke-destructive" />
const errorIcon = <div className="w-2 h-2 rounded-full bg-destructive" />

return tooltip ? <Tooltip title={t('common.outOfDate')}>{errorIcon}</Tooltip> : errorIcon
}

const LayerStatusIcon: FC<LayerStatusIconProps> = ({ tooltip }) => {
const { t } = useTranslation()
const successIcon = <CircleCheck size={16} className="stroke-success" />
const successIcon = <div className="w-2 h-2 rounded-full bg-success" />

return tooltip ? <Tooltip title={t('common.online')}>{successIcon}</Tooltip> : successIcon
}
Expand Down
14 changes: 7 additions & 7 deletions src/app/components/PageLayout/NetworkButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import { Button } from '@oasisprotocol/ui-library/src/components/ui/button'
import { Pen } from 'lucide-react'
import { ChevronDown } from 'lucide-react'
import { getNetworkNames, Network } from '../../../types/network'
import { Layer } from '../../../oasis-nexus/api'
import { getLayerLabels } from '../../utils/content'
Expand Down Expand Up @@ -33,13 +33,13 @@ export const NetworkButton: FC<NetworkButtonProps> = ({ isOutOfDate, layer, netw
shadow-none gap-0
focus-visible:ring-0 z-20"
>
<div className="flex w-full items-center justify-between gap-2 px-4">
{getNetworkButtonLabel(t, network, layer)}
<div className="flex w-full items-center gap-2 px-4">
<LayerStatus isOutOfDate={isOutOfDate} />
{getNetworkButtonLabel(t, network, layer)}
</div>

<div className="flex items-center justify-center h-10 px-4 border-l rounded-r-md">
<Pen className="text-primary w-4 h-4" />
<div className="flex items-center justify-center h-10 px-3 border-l rounded-r-md">
<ChevronDown className="w-5 h-5" />
</div>
</Button>
)
Expand All @@ -52,10 +52,10 @@ export const MobileNetworkButton: FC<NetworkButtonProps> = ({ isOutOfDate, layer
<Button
variant="outline"
onClick={onClick}
className="flex items-center gap-3 h-[30px] px-4 rounded-md font-medium shadow-none"
className="flex items-center gap-2 h-[30px] px-4 rounded-md font-medium shadow-none"
>
{getNetworkButtonLabel(t, network, layer)}
<LayerStatus isOutOfDate={isOutOfDate} />
{getNetworkButtonLabel(t, network, layer)}
</Button>
)
}
Loading