-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import { MockUser } from "~/mockUsersData"; | ||
import { Container } from "./styled"; | ||
|
||
interface Props { | ||
onClick: () => void; | ||
key?: React.Key | null; | ||
user: MockUser; | ||
} | ||
const TestUserCard = ({ onClick, key, user }: Props) => { | ||
return ( | ||
<Container key={key} onClick={onClick}> | ||
<h4>{user.nickname}</h4> | ||
<div> | ||
<div>email: {user.email}</div> | ||
<div>password: {user.password}</div> | ||
</div> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default TestUserCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Container = styled("div")` | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
z-index: 1; | ||
padding: 10px 30px; | ||
border: 1px solid ${({ theme }) => theme.backgroundSecondary}; | ||
border-radius: 16px; | ||
margin-bottom: 1rem; | ||
&:hover { | ||
cursor: pointer; | ||
background-color: ${({ theme }) => theme.backgroundSecondary}; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const mockUsersData: MockUser[] = [ | ||
{ | ||
nickname: "Tom", | ||
email: "[email protected]", | ||
password: "Password1", | ||
}, | ||
{ | ||
nickname: "Luna", | ||
email: "[email protected]", | ||
password: "Password1", | ||
}, | ||
{ | ||
nickname: "John", | ||
email: "[email protected]", | ||
password: "Password1", | ||
}, | ||
]; | ||
|
||
export type MockUser = { | ||
nickname: string; | ||
email: string; | ||
password: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters