|
1 |
| -import { Modal, Button, Icon } from 'semantic-ui-react' |
2 |
| - |
3 |
| -import SmallImage from './SmallImage.png' |
4 |
| -import LargeImage from './LargeImage.png' |
| 1 | +import Image from 'next/image' |
| 2 | +import * as React from 'react' |
| 3 | +import { Button, Header, Modal, Icon } from 'semantic-ui-react' |
5 | 4 |
|
6 | 5 | export default function Home() {
|
| 6 | + const [open, setOpen] = React.useState(false) |
| 7 | + |
7 | 8 | return (
|
8 | 9 | <div className="centered">
|
9 | 10 | <Icon size="massive" name="world" />
|
10 | 11 | <div className="separator" />
|
11 |
| - <Modal trigger={<Button>Show Modal</Button>}> |
12 |
| - <Modal.Header> |
13 |
| - <em>publicPath</em> should be set to <em>/_next/static/</em> |
14 |
| - </Modal.Header> |
15 |
| - <Modal.Content> |
| 12 | + <Modal |
| 13 | + onClose={() => setOpen(false)} |
| 14 | + onOpen={() => setOpen(true)} |
| 15 | + open={open} |
| 16 | + trigger={<Button>Show Modal</Button>} |
| 17 | + > |
| 18 | + <Modal.Header>Select a Photo</Modal.Header> |
| 19 | + <Modal.Content image> |
| 20 | + <span style={{ marginRight: 21 }}> |
| 21 | + <Image src="/image.png" width={400} height={266} /> |
| 22 | + </span> |
16 | 23 | <Modal.Description>
|
17 |
| - <div className="wrapper"> |
18 |
| - <div className="row"> |
19 |
| - <p> |
20 |
| - Larger content should be still available as a fallback to{' '} |
21 |
| - <em>fileLoader</em> but it should not pollute{' '} |
22 |
| - <em>/.next/static/css</em> folder. You should see two images |
23 |
| - below. One, smaller, loaded as data url, and one, bigger, |
24 |
| - loaded via url. |
25 |
| - </p> |
26 |
| - </div> |
27 |
| - <div className="row"> |
28 |
| - <img src={SmallImage} /> |
29 |
| - <p> |
30 |
| - A small image should be loaded as data url:{' '} |
31 |
| - <em>{SmallImage.substr(0, 100)}...</em> |
32 |
| - </p> |
33 |
| - </div> |
34 |
| - |
35 |
| - <div className="row"> |
36 |
| - <img src={LargeImage} /> |
37 |
| - <p> |
38 |
| - A large image should be loaded as a url: <em>{LargeImage}</em> |
39 |
| - </p> |
40 |
| - </div> |
41 |
| - <p className="border"> |
42 |
| - You should also still be able to load regular css. This text |
43 |
| - should have border. |
44 |
| - </p> |
45 |
| - </div> |
| 24 | + <Header>Default Profile Image</Header> |
| 25 | + <p> |
| 26 | + We've found the following gravatar image associated with your |
| 27 | + e-mail address. |
| 28 | + </p> |
| 29 | + <p>Is it okay to use this photo?</p> |
46 | 30 | </Modal.Description>
|
47 | 31 | </Modal.Content>
|
| 32 | + <Modal.Actions> |
| 33 | + <Button color="black" onClick={() => setOpen(false)}> |
| 34 | + Nope |
| 35 | + </Button> |
| 36 | + <Button |
| 37 | + content="Yep, that's me" |
| 38 | + labelPosition="right" |
| 39 | + icon="checkmark" |
| 40 | + onClick={() => setOpen(false)} |
| 41 | + positive |
| 42 | + /> |
| 43 | + </Modal.Actions> |
48 | 44 | </Modal>
|
49 | 45 | </div>
|
50 | 46 | )
|
|
0 commit comments