-
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
7 changed files
with
105 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
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
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,21 @@ | ||
import React from 'react'; | ||
import classes from './cat-card.module.css' | ||
|
||
const CatCard = (cat) => { | ||
|
||
// TODO: get values from cat model | ||
const catImage = 'https://t4.ftcdn.net/jpg/00/97/58/97/360_F_97589769_t45CqXyzjz0KXwoBZT9PRaWGHRk5hQqQ.jpg' | ||
const catName = 'Boris' | ||
|
||
return ( | ||
<div className={classes.card}> | ||
<img src={catImage} alt="Boris" className={classes.image}/> | ||
<h1>{catName}</h1> | ||
<p className={classes.title}>Хороший уличный кот</p> | ||
<p>Последний раз кормили: вчера в 21:10</p> | ||
<p><button>Покормить!</button></p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CatCard; |
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,37 @@ | ||
.card { | ||
width: auto; | ||
margin: auto; | ||
text-align: center; | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
} | ||
|
||
.title { | ||
color: grey; | ||
font-size: 18px; | ||
} | ||
|
||
button { | ||
border: none; | ||
outline: 0; | ||
display: inline-block; | ||
padding: 8px; | ||
color: white; | ||
background-color: #000; | ||
text-align: center; | ||
cursor: pointer; | ||
width: 100%; | ||
font-size: 18px; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
font-size: 22px; | ||
color: black; | ||
} | ||
|
||
button:hover, a:hover { | ||
opacity: 0.7; | ||
} |
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,13 @@ | ||
import React from 'react'; | ||
import classes from './cat-popup.module.css' | ||
import {Popup} from "react-leaflet"; | ||
import CatCard from "../../5-entities/cat/ui/cat-card.jsx"; | ||
|
||
export default function CatPopup({children, onClick}) { | ||
|
||
return ( //TODO: Cat card! | ||
<Popup autoPan={true}> | ||
<CatCard /> | ||
</Popup> | ||
) | ||
} |
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,25 @@ | ||
.catPopup { | ||
align-items: center; | ||
justify-content: center; | ||
min-width: 250px; | ||
display: flex; | ||
} | ||
|
||
.catPopupImage { | ||
display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
align-content: center; | ||
} | ||
|
||
.catPopupHead { | ||
font-weight: bold; | ||
font-size: 22px; | ||
text-align: center; | ||
} | ||
|
||
.catPopupContent { | ||
padding: 25px; | ||
background: white; | ||
border-radius: 16px; | ||
} |
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