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

Remove next/link from Example: With Chakra UI #10625

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 13 additions & 20 deletions examples/with-chakra-ui/src/components/CTA.js
@@ -1,4 +1,3 @@
import Link from 'next/link'
import { Link as ChakraLink, Button } from '@chakra-ui/core'

import { Container } from './Container'
Expand All @@ -12,27 +11,21 @@ export const CTA = () => (
maxWidth="48rem"
py={2}
>
<Link isExternal href="https://chakra-ui.com">
<ChakraLink isExternal href="https://chakra-ui.com" flexGrow={1} mx={2}>
<Button width="100%" variant="outline" variantColor="green">
chakra-ui
</Button>
</ChakraLink>
</Link>
<Link
<ChakraLink isExternal href="https://chakra-ui.com" flexGrow={1} mx={2}>
<Button width="100%" variant="outline" variantColor="green">
chakra-ui
</Button>
</ChakraLink>

<ChakraLink
isExternal
href="https://github.com/zeit/next.js/blob/canary/examples/with-chakra-ui"
flexGrow={3}
mx={2}
>
<ChakraLink
isExternal
href="https://github.com/zeit/next.js/blob/canary/examples/with-chakra-ui"
flexGrow={3}
mx={2}
>
<Button width="100%" variant="solid" variantColor="green">
View Repo
</Button>
</ChakraLink>
</Link>
<Button width="100%" variant="solid" variantColor="green">
View Repo
</Button>
</ChakraLink>
</Container>
)
32 changes: 11 additions & 21 deletions examples/with-chakra-ui/src/pages/index.js
@@ -1,5 +1,4 @@
import React from 'react'
import Link from 'next/link'
import { withTheme } from 'emotion-theming'
import {
Link as ChakraLink,
Expand Down Expand Up @@ -29,29 +28,20 @@ const Index = () => (
<List spacing={3} my={0}>
<ListItem>
<ListIcon icon="check-circle" color="green.500" />
<Link href="https://chakra-ui.com">
<ChakraLink
isExternal
href="https://chakra-ui.com"
flexGrow={1}
mr={2}
>
Chakra UI <Icon name="external-link" mx="2px" />
</ChakraLink>
</Link>
<ChakraLink
isExternal
href="https://chakra-ui.com"
flexGrow={1}
mr={2}
>
Chakra UI <Icon name="external-link" mx="2px" />
</ChakraLink>
</ListItem>
<ListItem>
<ListIcon icon="check-circle" color="green.500" />
<Link href="https://nextjs.org">
<ChakraLink
isExternal
href="https://nextjs.org"
flexGrow={1}
mr={2}
>
Next.js <Icon name="external-link" mx="2px" />
</ChakraLink>
</Link>
<ChakraLink isExternal href="https://nextjs.org" flexGrow={1} mr={2}>
Next.js <Icon name="external-link" mx="2px" />
</ChakraLink>
</ListItem>
</List>
</Main>
Expand Down