mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-25 12:55:36 +08:00
feat(page): add page component to index example
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
import Head from 'next/head'
|
||||
import { Text, Card, Note, Code, Spacer } from '@zeit-ui/react'
|
||||
import { Page, Text, Card, Note, Code, Spacer } from '@zeit-ui/react'
|
||||
|
||||
export default function Page() {
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="container">
|
||||
<Page>
|
||||
<Head>
|
||||
<title>Create Next App</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main>
|
||||
<Text h1>
|
||||
Welcome to <a href="https://nextjs.org">Next.js!</a>
|
||||
</Text>
|
||||
@@ -20,27 +18,6 @@ export default function Page() {
|
||||
<Card shadow>
|
||||
<Note type="success">This note details something important.</Note>
|
||||
</Card>
|
||||
</main>
|
||||
|
||||
<style jsx>{`
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
padding: 0 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 5rem 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user