Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limits changed to Elevated Access, margin added + copy changed #1010

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions src/nextapp/components/api-product-item/api-product-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ const ApiProductItem: React.FC<ApiProductItemProps> = ({
<Flex px={9} py={7} bg={'white'} mb={'0.5'}>
<Grid gap={4} flex={1} templateRows="auto" mr={12}>
<GridItem>
<Flex align="center" mb={2}>
<Flex align="center" mt={3}>
<Flex align="center" width={8}>
<Icon
as={isPublic || isTiered ? RiEarthFill : FaLock}
color="bc-blue"
boxSize="5"
data-testid={`product-icon-${kebabCase(data.name)}-${isPublic || isTiered ? 'RiEarthFill' : 'FaLock'}`}
data-testid={`product-icon-${kebabCase(data.name)}-${
isPublic || isTiered ? 'RiEarthFill' : 'FaLock'
}`}
/>
</Flex>
<Heading size="xs">{data.name}</Heading>
Expand All @@ -68,31 +70,35 @@ const ApiProductItem: React.FC<ApiProductItemProps> = ({
)}
</GridItem>
</Grid>
{!isTiered && isGatewayProtected && (
{!isTiered && isGatewayProtected ? (
<AccessRequestForm
disabled={false}
id={id}
name={data.name}
preview={preview}
/>
) : (
<Button
disabled={true}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
disabled={true}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or rather ={false} if we keep that attribute around usually

data-testid="no-api-key-button"
variant={'primary'}
fontWeight="600"
color="white"
>
No API Key Required
</Button>
)}
</Flex>
{isTiered && (
<Flex px={9} py={7} bg={'white'} my={-1} mb={'0.5'}>
<Grid gap={4} flex={1} templateRows="auto" mr={12}>
<Flex px={9} py={7} bg={'white'} my={-5} mb={'0.5'}>
<Grid gap={4} flex={1} templateRows="auto" ml={8} mr={12}>
<GridItem>
<Flex align="center" mb={2}>
<Flex align="center" mt={3}>
<Flex align="center" width={8}>
<Icon as={HiChartBar} color="bc-blue" boxSize="5" />
</Flex>
<Heading size="xs">Limits</Heading>
<Heading size="xs">Elevated Access</Heading>
</Flex>
<Text ml={8} fontSize="sm">
Public access has a rate limit enforced.
</Text>
<Text ml={8} fontSize="sm">
For elevated access, please request access.
</Text>
</GridItem>
</Grid>
<AccessRequestForm
Expand Down
Loading