Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
208551fc
Unverified
Commit
208551fc
authored
Nov 16, 2020
by
Abdullah Mzaien
Committed by
GitHub
Nov 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgraded to chakra V1 (#19181)
Upgraded charkra ui and peer dep and fixed the icon to follow the new api
parent
c8a29235
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
20 deletions
+20
-20
package.json
examples/with-chakra-ui/package.json
+8
-8
CTA.js
examples/with-chakra-ui/src/components/CTA.js
+1
-1
Container.js
examples/with-chakra-ui/src/components/Container.js
+1
-1
DarkModeSwitch.js
examples/with-chakra-ui/src/components/DarkModeSwitch.js
+1
-1
Footer.js
examples/with-chakra-ui/src/components/Footer.js
+1
-1
Hero.js
examples/with-chakra-ui/src/components/Hero.js
+1
-1
Main.js
examples/with-chakra-ui/src/components/Main.js
+1
-1
_app.js
examples/with-chakra-ui/src/pages/_app.js
+1
-1
index.js
examples/with-chakra-ui/src/pages/index.js
+4
-4
theme.js
examples/with-chakra-ui/src/theme.js
+1
-1
No files found.
examples/with-chakra-ui/package.json
View file @
208551fc
{
{
"name"
:
"with-chakra-ui"
,
"name"
:
"with-chakra-ui"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
"dev"
:
"next dev"
,
"dev"
:
"next dev"
,
"build"
:
"next build"
,
"build"
:
"next build"
,
"start"
:
"next start"
"start"
:
"next start"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@chakra-ui/core"
:
"^1.0.0-rc.8"
,
"@chakra-ui/icons"
:
"^1.0.0"
,
"@chakra-ui/icons"
:
"^1.0.0-rc.8"
,
"@chakra-ui/react"
:
"^1.0.0"
,
"@emotion/react"
:
"^11.0.0"
,
"@emotion/styled"
:
"^11.0.0"
,
"emotion-theming"
:
"^11.0.0"
,
"framer-motion"
:
"^2.9.4"
,
"framer-motion"
:
"^2.9.4"
,
"@emotion/styled"
:
"^10.0.27"
,
"next"
:
"latest"
,
"emotion-theming"
:
"^10.0.27"
,
"react"
:
"^17.0.1"
,
"next"
:
"^9.1.7"
,
"react-dom"
:
"^17.0.1"
"react"
:
"^16.12.0"
,
"react-dom"
:
"^16.12.0"
},
},
"license"
:
"MIT"
"license"
:
"MIT"
}
}
examples/with-chakra-ui/src/components/CTA.js
View file @
208551fc
import
{
Link
as
ChakraLink
,
Button
}
from
'@chakra-ui/
core
'
import
{
Link
as
ChakraLink
,
Button
}
from
'@chakra-ui/
react
'
import
{
Container
}
from
'./Container'
import
{
Container
}
from
'./Container'
...
...
examples/with-chakra-ui/src/components/Container.js
View file @
208551fc
import
{
Flex
,
useColorMode
}
from
'@chakra-ui/
core
'
import
{
Flex
,
useColorMode
}
from
'@chakra-ui/
react
'
export
const
Container
=
(
props
)
=>
{
export
const
Container
=
(
props
)
=>
{
const
{
colorMode
}
=
useColorMode
()
const
{
colorMode
}
=
useColorMode
()
...
...
examples/with-chakra-ui/src/components/DarkModeSwitch.js
View file @
208551fc
import
{
useColorMode
,
Switch
}
from
'@chakra-ui/
core
'
import
{
useColorMode
,
Switch
}
from
'@chakra-ui/
react
'
export
const
DarkModeSwitch
=
()
=>
{
export
const
DarkModeSwitch
=
()
=>
{
const
{
colorMode
,
toggleColorMode
}
=
useColorMode
()
const
{
colorMode
,
toggleColorMode
}
=
useColorMode
()
...
...
examples/with-chakra-ui/src/components/Footer.js
View file @
208551fc
import
{
Flex
}
from
'@chakra-ui/
core
'
import
{
Flex
}
from
'@chakra-ui/
react
'
export
const
Footer
=
(
props
)
=>
<
Flex
as
=
"footer"
py
=
"8rem"
{...
props
}
/
>
export
const
Footer
=
(
props
)
=>
<
Flex
as
=
"footer"
py
=
"8rem"
{...
props
}
/
>
examples/with-chakra-ui/src/components/Hero.js
View file @
208551fc
import
{
Flex
,
Heading
}
from
'@chakra-ui/
core
'
import
{
Flex
,
Heading
}
from
'@chakra-ui/
react
'
export
const
Hero
=
({
title
})
=>
(
export
const
Hero
=
({
title
})
=>
(
<
Flex
justifyContent
=
"center"
alignItems
=
"center"
height
=
"100vh"
>
<
Flex
justifyContent
=
"center"
alignItems
=
"center"
height
=
"100vh"
>
...
...
examples/with-chakra-ui/src/components/Main.js
View file @
208551fc
import
{
Stack
}
from
'@chakra-ui/
core
'
import
{
Stack
}
from
'@chakra-ui/
react
'
export
const
Main
=
(
props
)
=>
(
export
const
Main
=
(
props
)
=>
(
<
Stack
<
Stack
...
...
examples/with-chakra-ui/src/pages/_app.js
View file @
208551fc
import
{
ThemeProvider
,
CSSReset
,
ColorModeProvider
}
from
'@chakra-ui/
core
'
import
{
ThemeProvider
,
CSSReset
,
ColorModeProvider
}
from
'@chakra-ui/
react
'
import
theme
from
'../theme'
import
theme
from
'../theme'
...
...
examples/with-chakra-ui/src/pages/index.js
View file @
208551fc
...
@@ -6,8 +6,8 @@ import {
...
@@ -6,8 +6,8 @@ import {
List
,
List
,
ListIcon
,
ListIcon
,
ListItem
,
ListItem
,
}
from
'@chakra-ui/
core
'
}
from
'@chakra-ui/
react
'
import
{
ExternalLinkIcon
}
from
'@chakra-ui/icons'
import
{
Hero
}
from
'../components/Hero'
import
{
Hero
}
from
'../components/Hero'
import
{
Container
}
from
'../components/Container'
import
{
Container
}
from
'../components/Container'
import
{
Main
}
from
'../components/Main'
import
{
Main
}
from
'../components/Main'
...
@@ -32,13 +32,13 @@ const Index = () => (
...
@@ -32,13 +32,13 @@ const Index = () => (
flexGrow
=
{
1
}
flexGrow
=
{
1
}
mr
=
{
2
}
mr
=
{
2
}
>
>
Chakra
UI
<
Icon
name
=
"external-link"
mx
=
"2px"
/>
Chakra
UI
<
Icon
as
=
{
ExternalLinkIcon
}
mx
=
"2px"
/>
<
/ChakraLink
>
<
/ChakraLink
>
<
/ListItem
>
<
/ListItem
>
<
ListItem
>
<
ListItem
>
<
ListIcon
icon
=
"check-circle"
color
=
"green.500"
/>
<
ListIcon
icon
=
"check-circle"
color
=
"green.500"
/>
<
ChakraLink
isExternal
href
=
"https://nextjs.org"
flexGrow
=
{
1
}
mr
=
{
2
}
>
<
ChakraLink
isExternal
href
=
"https://nextjs.org"
flexGrow
=
{
1
}
mr
=
{
2
}
>
Next
.
js
<
Icon
name
=
"external-link"
mx
=
"2px"
/>
Next
.
js
<
Icon
as
=
{
ExternalLinkIcon
}
mx
=
"2px"
/>
<
/ChakraLink
>
<
/ChakraLink
>
<
/ListItem
>
<
/ListItem
>
<
/List
>
<
/List
>
...
...
examples/with-chakra-ui/src/theme.js
View file @
208551fc
import
{
theme
as
chakraTheme
}
from
'@chakra-ui/
core
'
import
{
theme
as
chakraTheme
}
from
'@chakra-ui/
react
'
const
fonts
=
{
...
chakraTheme
.
fonts
,
mono
:
`'Menlo', monospace`
}
const
fonts
=
{
...
chakraTheme
.
fonts
,
mono
:
`'Menlo', monospace`
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment