final

parent cba36eea
import CreateOrder from "@/pages/CreateOrder/CreateOrder"
import Home from "@/pages/Home/Home"
const HomePage = () => {
return (
<div>
<CreateOrder />
<Home />
</div>
)
......
.Card {
min-width: 320;
min-width: 320px;
min-height: 100px;
background-color: #F1F2F6;
border: 1px solid black;
......
......@@ -6,9 +6,10 @@ import CardButton from "../UI/CardButton/CardButton"
type Props = {
url: string
price: string
onClick: string
}
const Card = ({url, price}: Props) => {
const Card = ({url, price, onClick}: Props) => {
return (
<div className={styles.Card}>
<Image
......@@ -35,7 +36,7 @@ const Card = ({url, price}: Props) => {
<p className={styles.Price}>{price} KZT</p>
</div>
</div>
<CardButton label={"Let's go"}/>
<CardButton onClick={onClick} label={"Let's go"}/>
</div>
)
}
......
import Link from 'next/link'
import styles from './CardButton.module.css'
type Props = {
label: string
onClick: string
}
const CardButton = ({label}: Props) => {
const CardButton = ({label, onClick}: Props) => {
return (
<>
<button className={styles.CardButton}>{label}</button>
<Link href={onClick} className={styles.CardButton}>{label}</Link>
</>
)
}
......
const Description = () => {
return(<>asd</>)
}
\ No newline at end of file
.cards {
display: flex;
flex-direction: column;
gap: 28px;
}
\ No newline at end of file
......@@ -3,6 +3,7 @@
import BackdropWindow from "@/components/BackdropWindow/BackdropWindow"
import styles from './Home.module.css'
import { useState } from "react"
import Card from "@/components/Card/Card"
const Home = () => {
const [filters, showFilters] = useState(false)
......@@ -10,6 +11,9 @@ const Home = () => {
return (
<>
<div className={styles.cards}>
<Card url='/image.jpg' price="500" onClick='/description'/>
</div>
<BackdropWindow show={filters} close={() => showFilters(false)}>
<p>From</p>
<input placeholder="Choose country" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment