Skip to content

Commit

Permalink
feat(apps): add bottom actions to app layout, configure and animate e…
Browse files Browse the repository at this point in the history
…xisting actions
  • Loading branch information
alexfreska committed Oct 28, 2024
1 parent e9995c5 commit bde6f3a
Show file tree
Hide file tree
Showing 23 changed files with 531 additions and 444 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-poets-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/design-system': minor
---

Added dockedControls to AppAuthedLayout.
2 changes: 1 addition & 1 deletion .changeset/selfish-parrots-applaud.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
'renterd': minor
---

The onboarding wizard is now bottom right aligned.
The onboarding wizard now animates in and out.
5 changes: 5 additions & 0 deletions .changeset/spotty-readers-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

The transfers bar now animates in and out.
11 changes: 11 additions & 0 deletions apps/hostd/components/DockedControls.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import { OnboardingBar } from './OnboardingBar'

export function DockedControls({ children }: { children?: React.ReactNode }) {
return (
<div className="flex flex-col gap-2">
{children}
<OnboardingBar />
</div>
)
}
6 changes: 4 additions & 2 deletions apps/hostd/components/HostdAuthedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ import { connectivityRoute } from '../config/routes'
import { useSyncStatus } from '../hooks/useSyncStatus'
import { HostdTestnetWarningBanner } from './HostdTestnetWarningBanner'
import { Profile } from './Profile'
import { DockedControls } from './DockedControls'

type Props = Omit<
React.ComponentProps<typeof AppAuthedLayout>,
'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
>

export function HostdAuthedLayout(props: Props) {
export function HostdAuthedLayout({ dockedControls, ...props }: Props) {
const wallet = useWallet()
const { isSynced } = useSyncStatus()
return (
<AppAuthedLayout
appName="hostd"
connectivityRoute={connectivityRoute}
banner={<HostdTestnetWarningBanner />}
profile={<Profile />}
banner={<HostdTestnetWarningBanner />}
isSynced={isSynced}
walletBalanceSc={
wallet.data && {
Expand All @@ -29,6 +30,7 @@ export function HostdAuthedLayout(props: Props) {
unconfirmed: new BigNumber(wallet.data.unconfirmed),
}
}
dockedControls={<DockedControls>{dockedControls}</DockedControls>}
{...props}
/>
)
Expand Down
Loading

0 comments on commit bde6f3a

Please sign in to comment.