Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이혜연
/
Make_your_own_ chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hyeyeon-sun
2020-06-13 22:48:29 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
67ffa0e34cc14fbf075cd2202f49698c5f610304
67ffa0e3
1 parent
1ac285e8
material-ui apply
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
39 deletions
management/package-lock.json
management/package.json
management/src/App.js
management/src/components/Customer.js
management/package-lock.json
View file @
67ffa0e
This diff is collapsed. Click to expand it.
management/package.json
View file @
67ffa0e
...
...
@@ -3,6 +3,7 @@
"version"
:
"0.1.0"
,
"private"
:
true
,
"dependencies"
:
{
"@material-ui/core"
:
"^4.10.2"
,
"@testing-library/jest-dom"
:
"^4.2.4"
,
"@testing-library/react"
:
"^9.5.0"
,
"@testing-library/user-event"
:
"^7.2.1"
,
...
...
management/src/App.js
View file @
67ffa0e
import
React
,
{
Component
}
from
'react'
;
import
'./App.css'
;
import
Customer
from
'./components/Customer'
import
Customer
from
'./components/Customer'
;
import
Paper
from
'@material-ui/core/Paper'
;
import
Table
from
'@material-ui/core/Table'
;
import
TableHead
from
'@material-ui/core/TableHead'
;
import
TableBody
from
'@material-ui/core/TableBody'
;
import
TableRow
from
'@material-ui/core/TableRow'
;
import
TableCell
from
'@material-ui/core/TableCell'
;
import
{
withStyles
}
from
'@material-ui/core/styles'
;
const
styles
=
theme
=>
({
root
:
{
width
:
'100%'
,
marginTop
:
theme
.
spacing
.
unit
*
3
,
overflowX
:
"auto"
},
table
:
{
minWidth
:
1080
}
})
const
customers
=
[
{
...
...
@@ -32,18 +50,28 @@ const customers =[
class
App
extends
Component
{
render
()
{
const
{
classes
}
=
this
.
props
;
return
(
<
div
>
{
customers
.
map
(
c
=>
{
return
(
<
Customer
key
=
{
c
.
id
}
id
=
{
c
.
id
}
image
=
{
c
.
image
}
name
=
{
c
.
name
}
birthday
=
{
c
.
birthday
}
gender
=
{
c
.
gender
}
job
=
{
c
.
job
}
/
>
)
})
}
<
/div
>
<
Paper
className
=
{
classes
.
root
}
>
<
Table
className
=
{
classes
.
table
}
>
<
TableHead
>
<
TableRow
>
<
TableCell
>
번호
<
/TableCell
>
<
TableCell
>
이미지
<
/TableCell
>
<
TableCell
>
이름
<
/TableCell
>
<
TableCell
>
생년월일
<
/TableCell
>
<
TableCell
>
성별
<
/TableCell
>
<
TableCell
>
직업
<
/TableCell
>
<
/TableRow
>
<
/TableHead
>
<
TableBody
>
{
customers
.
map
(
c
=>
{
return
(
<
Customer
key
=
{
c
.
id
}
id
=
{
c
.
id
}
image
=
{
c
.
image
}
name
=
{
c
.
name
}
birthday
=
{
c
.
birthday
}
gender
=
{
c
.
gender
}
job
=
{
c
.
job
}
/>
)
}
)
}
<
/TableBody
>
<
/Table
>
<
/Paper
>
);
}
}
export
default
App
;
export
default
withStyles
(
styles
)(
App
);
...
...
management/src/components/Customer.js
View file @
67ffa0e
import
React
from
'react'
;
import
TableRow
from
'@material-ui/core/TableRow'
;
import
TableCell
from
'@material-ui/core/TableCell'
;
class
Customer
extends
React
.
Component
{
render
(){
return
(
<
div
>
<
CustomerProfile
id
=
{
this
.
props
.
id
}
image
=
{
this
.
props
.
image
}
name
=
{
this
.
props
.
name
}
/
>
<
CustomerInfo
birthday
=
{
this
.
props
.
birthday
}
gender
=
{
this
.
props
.
gender
}
job
=
{
this
.
props
.
job
}
/
>
<
/div
>
<
TableRow
>
<
TableCell
>
{
this
.
props
.
id
}
<
/TableCell
>
<
TableCell
><
img
src
=
{
this
.
props
.
image
}
alt
=
"profile"
/><
/TableCell
>
<
TableCell
>
{
this
.
props
.
name
}
<
/TableCell
>
<
TableCell
>
{
this
.
props
.
birthday
}
<
/TableCell
>
<
TableCell
>
{
this
.
props
.
gender
}
<
/TableCell
>
<
TableCell
>
{
this
.
props
.
job
}
<
/TableCell
>
<
/TableRow
>
);
}
}
class
CustomerProfile
extends
React
.
Component
{
render
(){
return
(
<
div
>
<
img
src
=
{
this
.
props
.
image
}
alt
=
"profile"
/>
<
h2
>
{
this
.
props
.
name
}({
this
.
props
.
id
})
<
/h2
>
<
/div
>
);
}
}
class
CustomerInfo
extends
React
.
Component
{
render
()
{
return
(
<
div
>
<
p
>
{
this
.
props
.
birthday
}
<
/p
>
<
p
>
{
this
.
props
.
gender
}
<
/p
>
<
p
>
{
this
.
props
.
job
}
<
/p
>
<
/div
>
)
}
}
export
default
Customer
;
\ No newline at end of file
...
...
Please
register
or
login
to post a comment