Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add file #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,532 changes: 5,076 additions & 456 deletions bewakoof/db.json

Large diffs are not rendered by default.

27,112 changes: 15,044 additions & 12,068 deletions bewakoof/package-lock.json

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion bewakoof/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.4.3",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.2.1",
"framer-motion": "^7.9.0",
"json-server": "^0.17.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
"react-redux": "^8.0.5",
"react-router-dom": "^6.4.5",
"react-scripts": "5.0.1",
Expand All @@ -18,7 +26,7 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"server":"json-server --watch db.json --port 8080",
"server": "json-server --watch db.json --port 8080",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
Expand Down
26 changes: 10 additions & 16 deletions bewakoof/src/App.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
import logo from './logo.svg';
import './App.css';
import logo from "./logo.svg";
import "./App.css";
import axios from "axios";
import { CheckoutPage } from "./Pages/CheckoutPage";
import { useEffect } from "react";
import { SinglePageData } from "./Components/SingleProduct/SinglePageData";
import { RecentView } from "./Components/SingleProduct/RecentView";
import { AddressForm } from "./Components/Cart/Address";

function App() {

return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>

</div>
);
}
Expand Down
63 changes: 63 additions & 0 deletions bewakoof/src/Components/Cart/Address.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React from "react";
import {
Popover,
PopoverTrigger,
PopoverContent,
PopoverHeader,
PopoverBody,
PopoverFooter,
PopoverArrow,
PopoverCloseButton,
Button,
Box,
FormControl,
FormLabel,
Input,
FormErrorMessage,
FormHelperText,
} from "@chakra-ui/react";
export const AddressForm = () => {
const initRef = React.useRef();
return (
<Popover
closeOnBlur={false}
placement="left"
usePortal
initialFocusRef={initRef}
>
{({ isOpen, onClose }) => (
<>
<PopoverTrigger border="1px solid red">
<Button marginLeft={"900"} border="1px solid red">Click to </Button>
</PopoverTrigger>
<PopoverContent border="4px solid blue" w={400}>
<PopoverHeader>Address Form</PopoverHeader>
<PopoverCloseButton />

<FormControl>
<FormLabel>Email address</FormLabel>
<Input type="email" />
<FormLabel>Country</FormLabel>
<Input type="text" />
<FormLabel>State</FormLabel>
<Input type="text" />
<FormLabel>City</FormLabel>
<Input type="text" />
<FormLabel>Pincode</FormLabel>
<Input type="number" />
<FormHelperText>We'll never share your email.</FormHelperText>
</FormControl>
<Button mt={4} colorScheme="teal" type="submit">
Submit
</Button>
<Button mt={4} variantColor="blue" onClick={onClose} ref={initRef}>
Close
</Button>

<PopoverFooter>This is the footer</PopoverFooter>
</PopoverContent>
</>
)}
</Popover>
);
};
Empty file.
116 changes: 116 additions & 0 deletions bewakoof/src/Components/SingleProduct/ProductOffer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// import React from "react";
// import { Box ,Flex,Center,Square,Text} from "@chakra-ui/react";

// export const SingleProduct = () => {
// return (
// <Box w="100px">
// <Flex color="white">
// <Square w="100px" bg="green.500">
// <Text>Box 1</Text>
// </Square>
// <Square w="100px" bg="blue.500" >
// <Text>Box 2</Text>
// </Square>
// <Square w="100px" h="400px"bg="tomato">
// <Text>Box 3</Text>
// </Square>
// </Flex>
// </Box>
// );
// };

import {Accordion,AccordionItem,AccordionButton,AccordionPanel, Box, Flex, Text} from '@chakra-ui/react'
import {AiOutlineMinus,AiOutlinePlus} from "react-icons/ai"
import{HiReceiptPercent} from "react-icons/hi2"

export default function ProductOffer(){

const Data=[{
heading:"Wohoo! Get a free gift worth Rs.399 on all prepaid orders Use Coupon Code- GETFREEGIFT."
},
{
heading:"Get Rs.200 instant discount on your First Purchase above Rs.999. Coupon code -NEW200"
},
{
heading:"Whistles! Get extra 20% Cashback on prepaid orders above Rs.499. Coupon code - NEW20. Applicable for new customers only!"
}
]
return (
<Accordion allowMultiple>
<AccordionItem>
{({ isExpanded }) => (
<>
<h2>
<AccordionButton>
<Box flex='1' textAlign='left' fontSize={"13px"} fontWeight={"600"}>
SAVE EXTRA WITH 3 OFFERS
</Box>
{isExpanded ? (
<AiOutlineMinus fontSize='12px' />
) : (
<AiOutlinePlus fontSize='12px' />
)}
</AccordionButton>
</h2>
<AccordionPanel pb={4}>
{Data.map((elem,i)=>{
return <Flex key={i}alignItems={"center"} gap={"10px"}>
<HiReceiptPercent fontSize={"25px"}/>
<Text width={"90%"} fontSize={"13px"} color={"RGBA(0, 0, 0, 0.48)"}>{elem.heading}</Text>
</Flex>
})}

</AccordionPanel>

</>
)}
</AccordionItem>

<AccordionItem>
{({ isExpanded }) => (
<>
<h2>
<AccordionButton>
<Box flex='1' textAlign='left' fontSize={"13px"} fontWeight={"600"}>
PRODUCT DESCRIPTION
</Box>
{isExpanded ? (
<AiOutlineMinus fontSize='12px' />
) : (
<AiOutlinePlus fontSize='12px' />
)}
</AccordionButton>
</h2>
<AccordionPanel pb={4} fontSize={"13px"} color={"RGBA(0, 0, 0, 0.48)"}>
Men's White What The Duck Graphic Printed Oversized T-shirt
</AccordionPanel>

</>
)}
</AccordionItem>

<AccordionItem>
{({ isExpanded }) => (
<>
<h2>
<AccordionButton>
<Box flex='1' textAlign='left' fontSize={"13px"} fontWeight={"600"}>
15 DAY RETURNS & EXCHANGE
</Box>
{isExpanded ? (
<AiOutlineMinus fontSize='12px' />
) : (
<AiOutlinePlus fontSize='12px'/>
)}
</AccordionButton>
</h2>
<AccordionPanel pb={4} fontSize={"13px"} color={"RGBA(0, 0, 0, 0.48)"}>
Easy returns upto 15 days of delivery. Exchange available on select pincodes
</AccordionPanel>

</>
)}
</AccordionItem>
</Accordion>
)
}
Loading