-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centrifuge App: Prime overview page (#1659)
- Loading branch information
1 parent
05ca4b9
commit b973b1d
Showing
21 changed files
with
507 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16 | ||
v18 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
centrifuge-app/src/components/LayoutBase/LayoutSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Box, BoxProps, Shelf, Stack, Text } from '@centrifuge/fabric' | ||
import * as React from 'react' | ||
import { BasePadding } from './BasePadding' | ||
|
||
type Props = { | ||
title?: React.ReactNode | ||
titleAddition?: React.ReactNode | ||
subtitle?: string | ||
headerRight?: React.ReactNode | ||
children: React.ReactNode | ||
} & BoxProps | ||
|
||
export function LayoutSection({ title, titleAddition, subtitle, headerRight, children, ...boxProps }: Props) { | ||
return ( | ||
<BasePadding as="section" gap={2} {...boxProps}> | ||
{(title || titleAddition || subtitle || headerRight) && ( | ||
<Shelf justifyContent="space-between" as="header"> | ||
<Stack> | ||
{(title || titleAddition) && ( | ||
<Shelf gap={1} alignItems="baseline"> | ||
{title && ( | ||
<Text as="h2" variant="heading2"> | ||
{title} | ||
</Text> | ||
)} | ||
<Text variant="body2" color="textSecondary"> | ||
{titleAddition} | ||
</Text> | ||
</Shelf> | ||
)} | ||
{subtitle && ( | ||
<Text variant="body2" as="small" color="textSecondary"> | ||
{subtitle} | ||
</Text> | ||
)} | ||
</Stack> | ||
<Box ml="auto">{headerRight}</Box> | ||
</Shelf> | ||
)} | ||
{children} | ||
</BasePadding> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useParams } from 'react-router' | ||
import { LayoutBase } from '../../components/LayoutBase' | ||
|
||
export default function PrimeDetailPage() { | ||
return ( | ||
<LayoutBase> | ||
<PrimeDetail /> | ||
</LayoutBase> | ||
) | ||
} | ||
|
||
function PrimeDetail() { | ||
const { dao } = useParams<{ dao: string }>() | ||
return <div>Prime detail, {dao}</div> | ||
} |
Oops, something went wrong.