Skip to content

Commit bbb8ff7

Browse files
impronunciabletimneutkens
authored andcommitted
Add/semantic ui example (vercel#1753)
* Using developit/unfetch as the Fetch API polyfill * Added Semantic UI React example * Fixed linting issues
1 parent 1bb20b1 commit bbb8ff7

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

examples/with-semantic-ui/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Semantic UI example
3+
4+
## How to use
5+
6+
Download the example [or clone the repo](https://github.com/zeit/next.js):
7+
8+
```bash
9+
curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-semantic-ui
10+
cd with-semantic-ui
11+
```
12+
13+
Install it and run:
14+
15+
```bash
16+
npm install
17+
npm run dev
18+
```
19+
20+
Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))
21+
22+
```bash
23+
now
24+
```
25+
26+
## The idea behind the example
27+
28+
This example shows how to use Next.js along with [Semantic UI React](http://react.semantic-ui.com). This is intended to show the integration of this
29+
UI toolkit with the Framework,
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "with-semantic-ui",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"dev": "next",
6+
"build": "next build",
7+
"start": "next start"
8+
},
9+
"dependencies": {
10+
"next": "latest",
11+
"react": "^15.4.2",
12+
"react-dom": "^15.4.2",
13+
"semantic-ui-react": "^0.68.0"
14+
},
15+
"author": "",
16+
"license": "ISC"
17+
}
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import Head from 'next/head'
2+
import { Modal, Header, Button, List } from 'semantic-ui-react'
3+
4+
export default () => (
5+
<div>
6+
<Head>
7+
<link rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css' />
8+
</Head>
9+
<Modal trigger={<Button>Show Modal</Button>}>
10+
<Modal.Header>Select a Photo</Modal.Header>
11+
<Modal.Content image>
12+
<Modal.Description>
13+
<Header>Default Profile Image</Header>
14+
<p>We've found the following gravatar image associated with your e-mail address.</p>
15+
<p>Is it okay to use this photo?</p>
16+
</Modal.Description>
17+
</Modal.Content>
18+
</Modal>
19+
20+
<List vertical relaxed>
21+
<List.Item>
22+
<List.Content>
23+
<List.Header as='a'>Next.js</List.Header>
24+
</List.Content>
25+
</List.Item>
26+
<List.Item>
27+
<List.Content>
28+
<List.Header as='a'>React</List.Header>
29+
</List.Content>
30+
</List.Item>
31+
<List.Item>
32+
<List.Content>
33+
<List.Header as='a'>Vue.js</List.Header>
34+
</List.Content>
35+
</List.Item>
36+
</List>
37+
</div>
38+
)

0 commit comments

Comments
 (0)