-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc7b895
commit 9609ea9
Showing
7 changed files
with
190 additions
and
254 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* eslint-disable no-negated-condition */ | ||
import { | ||
Box, | ||
Button, | ||
Card, | ||
CardBody, | ||
CardHeader, | ||
Heading, | ||
Link, | ||
Stack, | ||
StackDivider, | ||
Text | ||
} from '@chakra-ui/react' | ||
import type { SdkOption } from '../utils/DataUtil' | ||
import { IoArrowForward } from 'react-icons/io5' | ||
import type { ReactNode } from 'react' | ||
import { RandomLink } from './RandomLink' | ||
|
||
type Props = { | ||
title: ReactNode | ||
sdkOptions: SdkOption[] | ||
} | ||
|
||
export function ConfigurationList({ title, sdkOptions }: Props) { | ||
return ( | ||
<> | ||
<Card marginTop={10} marginBottom={10}> | ||
<CardHeader> | ||
<Heading size="md">{title}</Heading> | ||
</CardHeader> | ||
<CardBody> | ||
<Stack divider={<StackDivider />} spacing="4"> | ||
{sdkOptions.map(option => ( | ||
<Box key={option.link + option.title}> | ||
<Stack direction="row" justifyContent="space-between" alignItems="center"> | ||
<Box> | ||
<Heading size="xs" textTransform="uppercase"> | ||
{option.title} | ||
</Heading> | ||
<Text pt="2" fontSize="sm"> | ||
{option.description} | ||
</Text> | ||
</Box> | ||
{option.randomLinks !== undefined && option.randomLinks.length > 0 ? ( | ||
<RandomLink hrefs={option.randomLinks}> | ||
<Button rightIcon={<IoArrowForward />}>Go</Button> | ||
</RandomLink> | ||
) : ( | ||
<Link href={option.link}> | ||
<Button rightIcon={<IoArrowForward />}>Go</Button> | ||
</Link> | ||
)} | ||
</Stack> | ||
</Box> | ||
))} | ||
</Stack> | ||
</CardBody> | ||
</Card> | ||
</> | ||
) | ||
} |
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
Oops, something went wrong.