4 changed files with 103 additions and 57 deletions
@ -1,3 +1,11 @@
|
||||
.App { |
||||
text-align: center; |
||||
} |
||||
|
||||
.red { |
||||
color:red; |
||||
} |
||||
|
||||
.bold { |
||||
font-weight: bold; |
||||
} |
||||
@ -1,16 +1,35 @@
|
||||
import React from 'react'; |
||||
import './Person.css'; |
||||
import React from "react"; |
||||
// import './Person.css';
|
||||
import styled from "styled-components"; |
||||
|
||||
const person = (props) => { |
||||
const StyledDiv = styled.div` |
||||
width: 500px; |
||||
margin: 16px auto; |
||||
border: 1px solid #eee; |
||||
color: green; |
||||
box-shadow: 0 2px 3px #ccc; |
||||
padding: 16px; |
||||
text-align: center; |
||||
|
||||
@media (min-width: 500px) { |
||||
width: 450px; |
||||
} |
||||
`;
|
||||
|
||||
const person = props => { |
||||
return ( |
||||
<div className="Person"> |
||||
<p>I'm {props.name} and my ilvl is {props.ilvl} and ready to raid!</p> |
||||
// <div className="Person">
|
||||
<StyledDiv> |
||||
<p> |
||||
I'm {props.name} and my ilvl is {props.ilvl} and ready to raid! |
||||
</p> |
||||
<p>{props.children}</p> |
||||
<input type="text" onChange={props.changed} defaultValue={props.name} /> |
||||
<button onClick={props.click}>delete</button> |
||||
{console.log('props:', props)} |
||||
</div> |
||||
) |
||||
{console.log("props:", props)} |
||||
</StyledDiv> |
||||
// </div>
|
||||
); |
||||
}; |
||||
|
||||
export default person; |
||||
Loading…
Reference in new issue