File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type { TypographyProps } from '@mui/material'
2+ import { Typography } from '@mui/material'
13import React from 'react'
24
35import { useOnBoarding } from '../hooks/index.ts'
@@ -12,11 +14,19 @@ export const Onboarding: React.FC = () => {
1214
1315 return (
1416 < >
17+ < SectionHeadingTypography active = { ! producerIsReachable } > Start Producer and Copy Seed Phrase</ SectionHeadingTypography >
1518 { producerIsReachable ? < RunProducerAlerts . Found /> : < RunProducerAlerts . NotFound /> }
1619 { producerIsReachable && < RunProducerAlerts . CopyPhrase /> }
20+ < SectionHeadingTypography active = { walletIsNotInstalled } > Install and Setup Wallet</ SectionHeadingTypography >
1721 { walletIsNotInstalled === true && < WalletAlerts . NotInstalled /> }
1822 { walletIsInstalled === true && < WalletAlerts . Installed /> }
1923 { walletIsInstalled === true && < WalletAlerts . Setup /> }
2024 </ >
2125 )
2226}
27+
28+ export const SectionHeadingTypography : React . FC < TypographyProps & { active ?: boolean } > = ( { active, ...props } ) => {
29+ return (
30+ < Typography variant = "subtitle1" sx = { { opacity : active ? 1 : 0.33 } } { ...props } />
31+ )
32+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ import {
66import { isDefined } from '@xylabs/typeof'
77import React , { useState } from 'react'
88
9- export const CollapsibleAlert : React . FC < AlertProps & { alertTitle : string } > = ( {
9+ export interface CollapsableAlertProps extends AlertProps {
10+ alertTitle ?: string
11+ }
12+
13+ export const CollapsibleAlert : React . FC < CollapsableAlertProps > = ( {
1014 alertTitle, sx, ...props
1115} ) => {
1216 const [ open , setOpen ] = useState ( true )
Original file line number Diff line number Diff line change 44 Stack ,
55} from '@mui/material'
66
7+ import type { CollapsableAlertProps } from './CollapsibleAlert.tsx'
78import { CollapsibleAlert } from './CollapsibleAlert.tsx'
89
910const InstallWalletAlert : React . FC < AlertProps > = ( props ) => {
@@ -30,7 +31,7 @@ const WalletInstalledAlert: React.FC<AlertProps> = (props) => {
3031 )
3132}
3233
33- const WalletSetupAlert : React . FC < AlertProps > = ( props ) => {
34+ const WalletSetupAlert : React . FC < CollapsableAlertProps > = ( props ) => {
3435 return (
3536 < CollapsibleAlert alertTitle = "Wallet Setup Required" severity = "info" { ...props } >
3637 Once the wallet is installed:
Original file line number Diff line number Diff line change 66import { grey } from '@mui/material/colors'
77import { useState } from 'react'
88
9+ import type { CollapsableAlertProps } from './CollapsibleAlert.tsx'
910import { CollapsibleAlert } from './CollapsibleAlert.tsx'
1011
1112const START_COMMAND = 'npm run start-cli'
@@ -65,15 +66,15 @@ const StartProducerAlert: React.FC<AlertProps> = (props) => {
6566 )
6667}
6768
68- const ProducerFoundAlert : React . FC < AlertProps > = ( props ) => {
69+ const ProducerFoundAlert : React . FC < CollapsableAlertProps > = ( props ) => {
6970 return (
7071 < CollapsibleAlert severity = "success" alertTitle = "Connected to Local Blockchain" { ...props } >
7172 You can now submit transactions to your local XYO Layer One blockchain.
7273 </ CollapsibleAlert >
7374 )
7475}
7576
76- const CopyProducerPhraseAlert : React . FC < AlertProps > = ( props ) => {
77+ const CopyProducerPhraseAlert : React . FC < CollapsableAlertProps > = ( props ) => {
7778 return (
7879 < CollapsibleAlert alertTitle = "Copy the Producer Phrase" severity = "info" { ...props } >
7980 Check the CLI output for the producer seed phrase. You will need this to see balances and submit transactions in your wallet.
You can’t perform that action at this time.
0 commit comments