import styled from 'styled-components';
export const Card = (props) => {
const { children } = props;
return <SCard>{children}</SCard>;
};
const SCard = styled.div`
background-color: #fff;
box-shadow: #ddd 0px 0px 4px 2px;
border-radius: 8px;
padding: 16px;
`;
import styled from 'styled-components';
export const UserIconWithName = (props) => {
const { image, name } = props;
return (
<SContainer>
<SImg height={160} width={160} src={image} alt={name} />
<SName>{name}</SName>
</SContainer>
);
};
const SContainer = styled.div`
text-align: center;
`;
const SImg = styled.img`
border-radius: 50%;
`;
const SName = styled.p`
font-size: 18px;
font-weight: bold;
margin: 0;
color: #40514;
`;
import styled from 'styled-components';
import { Card } from '../../atoms/card/Card';
import { UserIconWithName } from '../../molecules/user/UserIcomWithName';
export const UserCard = (props) => {
const { user } = props;
return (
<Card>
<UserIconWithName image={user.image} name={user.name} />
<SDl>
<dt>メール</dt>
<dd>{user.email}</dd>
<dt>TEL</dt>
<dd>{user.phone}</dd>
<dt>会社名</dt>
<dd>{user.company.name}</dd>
<dt>WEB</dt>
<dd>{user.website}</dd>
</SDl>
</Card>
);
};
const SDl = styled.dl`
text-align: left;
dt{
float: left;
}
dd{
padding-left: 32px;
padding-bottom: 8px;
}
`;