|
1 | 1 | import React from 'react'; |
2 | 2 | import { CardStack, Card } from 'react-cardstack'; |
| 3 | +import { Link } from 'react-router' |
3 | 4 |
|
4 | | -import ClientService from 'services/Client'; |
| 5 | +import ClientService from 'services/Client' |
5 | 6 | import Error from 'components/Error/Error' |
6 | 7 |
|
| 8 | +import btn from 'components/Client/styles.css' |
| 9 | + |
7 | 10 | class Client extends React.Component |
8 | 11 | { |
9 | 12 | constructor(props) { |
@@ -34,33 +37,69 @@ class Client extends React.Component |
34 | 37 | return <div>Loading...</div>; |
35 | 38 | } |
36 | 39 | const clientList = this.state.clients.map((client, key) => { |
| 40 | + let line = ((key % 2) ? 'is-success' : 'is-info'); |
37 | 41 | return ( |
38 | | - <Card key={key}> |
39 | | - <article className={`message ${((key % 2) ? 'is-success' : 'is-info')}`}> |
40 | | - <div className="message-header"> |
41 | | - <strong>{ client.name }</strong> |
| 42 | + <div className={`columns notification ${line}`} key={key}> |
| 43 | + <div className="column"> |
| 44 | + { client.name } |
| 45 | + </div> |
| 46 | + <div className="column"> |
| 47 | + { client.address } |
| 48 | + </div> |
| 49 | + <div className="column"> |
| 50 | + { client.city } |
42 | 51 | </div> |
43 | | - <div className="message-body"> |
44 | | - <address>{ client.address }</address> |
45 | | - <city><small>{ client.city }</small></city> |
| 52 | + <div className="column"> |
| 53 | + <Link to={ `#` } |
| 54 | + className="button is-info is-button-block" |
| 55 | + > |
| 56 | + <span className="icon"> |
| 57 | + <i className="fa fa-check"></i> |
| 58 | + </span> |
| 59 | + <span>Visited</span> |
| 60 | + </Link> |
46 | 61 | </div> |
47 | | - </article> |
48 | | - </Card> |
| 62 | + |
| 63 | + <div className="column"> |
| 64 | + <Link to={ `#` } |
| 65 | + className="button is-info is-button-block" |
| 66 | + > |
| 67 | + <span className="icon"> |
| 68 | + <i className="fa fa-calendar"></i> |
| 69 | + </span> |
| 70 | + <span>Schedule</span> |
| 71 | + </Link> |
| 72 | + </div> |
| 73 | + |
| 74 | + <div className="column"> |
| 75 | + <Link to={ `#` } |
| 76 | + className="button is-info is-button-block" |
| 77 | + > |
| 78 | + <span className="icon"> |
| 79 | + <i className="fa fa-pencil"></i> |
| 80 | + </span> |
| 81 | + <span>Update</span> |
| 82 | + </Link> |
| 83 | + </div> |
| 84 | + |
| 85 | + <div className="column"> |
| 86 | + <Link to={ `#` } |
| 87 | + className="button is-danger is-button-block" |
| 88 | + > |
| 89 | + <span className="icon"> |
| 90 | + <i className="fa fa-close"></i> |
| 91 | + </span> |
| 92 | + <span>Delete</span> |
| 93 | + </Link> |
| 94 | + </div> |
| 95 | + </div> |
49 | 96 | ); |
50 | 97 | }); |
51 | 98 |
|
52 | 99 | return ( |
53 | | - <div className="container hello"> |
54 | | - <CardStack |
55 | | - height={100} |
56 | | - width={1200} |
57 | | - background='#00d1b2' |
58 | | - hoverOffset={0}> |
59 | | - |
| 100 | + <div> |
60 | 101 | { clientList } |
61 | | - |
62 | | - </CardStack> |
63 | | - </div> |
| 102 | + </div> |
64 | 103 | ); |
65 | 104 | } |
66 | 105 | } |
|
0 commit comments