Skip to content

Commit

Permalink
feat: hide disabled buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda committed May 20, 2024
1 parent fb4c451 commit 5107c36
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@
</div>
<div slot="leftpane__action" class="flex flex-col space-y-4">
{#each Object.values(NetworkId) as networkId}
<OnboardingButton
primaryText={localize(`views.onboarding.networkSetup.chooseNetwork.${networkId}.title`)}
secondaryText={localize(`views.onboarding.networkSetup.chooseNetwork.${networkId}.body`)}
icon={NETWORK_ICON[networkId]}
iconColor={getIconColor(networkId)}
hidden={features?.onboarding?.[networkId]?.hidden}
disabled={!features?.onboarding?.[networkId]?.enabled}
onClick={() => onNetworkSelectionClick(networkId)}
/>
{#if features?.onboarding?.[networkId]?.enabled}
<OnboardingButton
primaryText={localize(`views.onboarding.networkSetup.chooseNetwork.${networkId}.title`)}
secondaryText={localize(`views.onboarding.networkSetup.chooseNetwork.${networkId}.body`)}
icon={NETWORK_ICON[networkId]}
iconColor={getIconColor(networkId)}
hidden={features?.onboarding?.[networkId]?.hidden}
disabled={!features?.onboarding?.[networkId]?.enabled}
onClick={() => onNetworkSelectionClick(networkId)}
/>
{/if}
{/each}
</div>
<div slot="rightpane" class="w-full h-full flex justify-center bg-pastel-yellow dark:bg-gray-900">
Expand Down

0 comments on commit 5107c36

Please sign in to comment.