Skip to content

Commit

Permalink
feat: add dapps dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidsowardx committed Sep 20, 2023
1 parent 5419e1e commit 078a737
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function Header(props: BoxProps) {
sx={[
{
p: 2,
pr: 3,
gap: 2,
bgcolor: 'background.surface',
display: 'flex',
Expand Down
15 changes: 14 additions & 1 deletion examples/layouts/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-ignore
import radixLogo from '../assets/radix-icon_128x128.png'
import * as React from 'react'
import '@radixdlt/dapps-dropdown'
import Box from '@mui/joy/Box'
import Typography from '@mui/joy/Typography'
import IconButton from '@mui/joy/IconButton'
Expand All @@ -18,6 +19,10 @@ declare global {
React.HTMLAttributes<HTMLElement>,
HTMLElement
>
'radix-dapps-dropdown': React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement>,
HTMLElement
>
}
}
}
Expand Down Expand Up @@ -57,7 +62,14 @@ export const Header = ({
</Typography>
</Box>

<Box sx={{ display: 'flex', flexDirection: 'row', gap: 1.5 }}>
<Box
sx={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
gap: 1.5,
}}
>
<Select
value={networkId}
onChange={(_, value) => {
Expand All @@ -74,6 +86,7 @@ export const Header = ({
</Select>

<radix-connect-button></radix-connect-button>
<radix-dapps-dropdown></radix-dapps-dropdown>
</Box>
</Layout.Header>
)
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@mui/joy": "^5.0.0-alpha.76",
"@mui/material": "^5.12.1",
"@radixdlt/radix-engine-toolkit": "0.4.0",
"@radixdlt/dapps-dropdown": "^0.2.0",
"@radixdlt/rola": "^0.3.1-rcnet-v3.1.1",
"@types/elliptic": "^6.4.14",
"@types/jest": "^29.4.0",
Expand Down

0 comments on commit 078a737

Please sign in to comment.