Skip to content

Commit 9352d18

Browse files
committed
fix: fix staking app tab selected states
1 parent b800ad1 commit 9352d18

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

apps/staking/src/components/Dashboard/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,12 @@ const Journey = ({
268268
}: JourneyProps) => (
269269
<Tab
270270
className={clsx(
271-
"group/tab flex flex-1 cursor-pointer flex-col items-center bg-pythpurple-800 focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 selected:cursor-default group-data-[empty]:sm:bg-transparent",
271+
"group/tab flex flex-1 cursor-pointer flex-col items-center bg-pythpurple-800 focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 data-[selected]:cursor-default group-data-[empty]:sm:bg-transparent",
272272
className,
273273
)}
274274
{...props}
275275
>
276-
<div className="group-selected/tab:border-pythpurple-400/60 group-selected/tab:bg-pythpurple-600/60 group-hover/tab:group-selected/tab:bg-pythpurple-600/60 grid size-full flex-none basis-0 place-content-center border border-neutral-600/50 bg-pythpurple-800 p-2 text-center font-semibold transition group-hover/tab:bg-pythpurple-600/30 group-data-[empty]:py-8 sm:py-4 sm:text-lg group-data-[empty]:sm:py-2">
276+
<div className="group-data-[selected]/tab:border-pythpurple-400/60 group-data-[selected]/tab:bg-pythpurple-600/60 group-hover/tab:group-data-[selected]/tab:bg-pythpurple-600/60 grid size-full flex-none basis-0 place-content-center border border-neutral-600/50 bg-pythpurple-800 p-2 text-center font-semibold transition group-hover/tab:bg-pythpurple-600/30 group-data-[empty]:py-8 sm:py-4 sm:text-lg group-data-[empty]:sm:py-2">
277277
<span className="hidden group-data-[empty]:inline sm:inline">
278278
{longText}
279279
</span>

apps/staking/src/components/Guide/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ export const Guide = ({ title, description, steps, ...props }: Props) => {
6161
{({ title, icon: Icon, index }) => (
6262
<Tab
6363
id={index.toString()}
64-
className="group flex cursor-pointer flex-row items-center gap-4 border border-neutral-600/50 px-6 py-4 transition focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 selected:cursor-default selected:border-pythpurple-600 selected:bg-pythpurple-600/20 md:flex-1 md:px-4 md:py-2 lg:border-b lg:border-x-transparent lg:border-t-transparent lg:bg-black/40 lg:px-4 lg:py-6 lg:selected:border-neutral-600/50 lg:selected:border-b-transparent lg:selected:bg-black/40 xl:px-10 2xl:px-20"
64+
className="group flex cursor-pointer flex-row items-center gap-4 border border-neutral-600/50 px-6 py-4 transition focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 data-[selected]:cursor-default data-[selected]:border-pythpurple-600 data-[selected]:bg-pythpurple-600/20 md:flex-1 md:px-4 md:py-2 lg:border-b lg:border-x-transparent lg:border-t-transparent lg:bg-black/40 lg:px-4 lg:py-6 lg:data-[selected]:border-neutral-600/50 lg:data-[selected]:border-b-transparent lg:data-[selected]:bg-black/40 xl:px-10 2xl:px-20"
6565
>
66-
<Icon className="group-selected:opacity-100 size-10 flex-none opacity-50 transition" />
66+
<Icon className="group-data-[selected]:opacity-100 size-10 flex-none opacity-50 transition" />
6767
<div className="flex flex-col justify-between">
6868
<div className="text-sm tracking-[0.5rem] opacity-50 md:tracking-wide">
6969
STEP {index + 1}
7070
</div>
71-
<div className="group-selected:opacity-100 opacity-50 transition xl:text-xl">
71+
<div className="group-data-[selected]:opacity-100 opacity-50 transition xl:text-xl">
7272
{title}
7373
</div>
7474
</div>
@@ -95,7 +95,7 @@ export const Guide = ({ title, description, steps, ...props }: Props) => {
9595
{({ title, index: subtabIndex }) => (
9696
<Tab
9797
id={subtabIndex.toString()}
98-
className="grid cursor-pointer place-content-center border border-neutral-600/50 p-2 text-center opacity-60 transition focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 selected:cursor-default selected:border-pythpurple-600/50 selected:bg-pythpurple-600/10 selected:opacity-100 sm:h-20 sm:flex-1 sm:px-2 sm:py-4 md:px-4"
98+
className="grid cursor-pointer place-content-center border border-neutral-600/50 p-2 text-center opacity-60 transition focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 data-[selected]:cursor-default data-[selected]:border-pythpurple-600/50 data-[selected]:bg-pythpurple-600/10 data-[selected]:opacity-100 sm:h-20 sm:flex-1 sm:px-2 sm:py-4 md:px-4"
9999
>
100100
{title}
101101
</Tab>

apps/staking/src/components/NoWalletHome/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,19 +204,19 @@ const ProgramTab = ({
204204
}: ProgramTabProps) => (
205205
<Tab
206206
className={clsx(
207-
"group flex flex-1 cursor-pointer flex-col items-center focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 selected:cursor-default",
207+
"group flex flex-1 cursor-pointer flex-col items-center focus:outline-none focus-visible:ring-1 focus-visible:ring-pythpurple-400 data-[selected]:cursor-default",
208208
className,
209209
)}
210210
{...props}
211211
>
212-
<div className="group-selected:opacity-100 relative hidden w-4/5 opacity-30 transition group-hover:opacity-60 md:block">
212+
<div className="group-data-[selected]:opacity-100 relative hidden w-4/5 opacity-30 transition group-hover:opacity-60 md:block">
213213
<div className="absolute inset-0 bg-[#E6DAFE] mix-blend-color" />
214214
<Image src={image} alt="" className="size-full" />
215215
<div className="absolute inset-0 top-16 text-center text-2xl text-pythpurple-800 lg:text-3xl">
216216
{description}
217217
</div>
218218
</div>
219-
<div className="group-selected:border-pythpurple-400 group-selected:bg-pythpurple-600 md:group-selected:border-pythpurple-400 size-full border border-transparent text-center font-semibold leading-none transition md:border-neutral-600/50 md:bg-pythpurple-800 md:text-lg">
219+
<div className="group-data-[selected]:border-pythpurple-400 group-data-[selected]:bg-pythpurple-600 md:group-data-[selected]:border-pythpurple-400 size-full border border-transparent text-center font-semibold leading-none transition md:border-neutral-600/50 md:bg-pythpurple-800 md:text-lg">
220220
<div className="grid size-full place-content-center p-2 group-hover:bg-pythpurple-600/60 md:p-4">
221221
{children}
222222
</div>

0 commit comments

Comments
 (0)