-
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
12 changed files
with
621 additions
and
232 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,62 @@ | ||
import React,{useState} from 'react' | ||
import "./style_h.css" | ||
const items = [ | ||
{ | ||
header: "ABOUT US", | ||
header2: "ABOUT US", | ||
content: "this is about us.", | ||
}, | ||
|
||
{ | ||
header: "OUR VISION", | ||
header2: "OUR VISION", | ||
content: "this is our vision.", | ||
}, | ||
|
||
{ | ||
header: "NEWSLETTER", | ||
header2: "NEWSLETTER", | ||
content: "this is Newsssss.", | ||
}, | ||
{ | ||
header: "CONTACT", | ||
header2: "CONTACT", | ||
content: "contact details in the footer.", | ||
}, | ||
]; | ||
|
||
function HAccord() { | ||
const [accord,setActiveAccord]=useState(-1); | ||
|
||
const toggleAccordion=(index) =>{ | ||
setActiveAccord(index); | ||
} | ||
return ( | ||
<> | ||
<div className='text-white h_accord_main flex flex-col items-center'> | ||
{items.map((item,index) => { | ||
return ( | ||
<div key={index} onClick={()=> toggleAccordion(index)} > | ||
<div className='flex justify-between p-6'> | ||
<div className="h_accord_heading"> | ||
<h3 className={accord === index ? "active":""}>{item.header2}</h3> | ||
</div> | ||
<div> | ||
{ accord === index ? (<><span className='verticle'>-</span></>) : (<><span className='verticle'>+</span></>)} | ||
|
||
</div> | ||
</div> | ||
<div> | ||
<p className={accord === index ? 'active' : "inactive"}>{item.content}</p> | ||
</div> | ||
</div> | ||
); | ||
}) | ||
|
||
} | ||
</div> | ||
</> | ||
) | ||
|
||
} | ||
export default HAccord |
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,34 @@ | ||
.h_accord_main .inactive { | ||
display:none; | ||
} | ||
|
||
.h_accord_main >div { | ||
background-image: linear-gradient(to bottom, #061b24 2%, #072031, #000b11 91%); | ||
border: 2px solid #319795; | ||
margin-bottom:20px; | ||
padding:0px 40px; | ||
border-radius:15px; | ||
cursor:pointer; | ||
width:80%; | ||
|
||
} | ||
.h_accord_heading { | ||
display:flex; | ||
justify-content:space-between; | ||
align-items:center; | ||
} | ||
.h_accord_heading .active { | ||
color:#319795; | ||
} | ||
.h_accord_heading h3 { | ||
color:rgb(20 184 166 / var(--tw-border-opacity)); | ||
font-weight:600; | ||
font-size:larger; | ||
} | ||
.h_accord_main p { | ||
margin:2px; | ||
padding-bottom: 30px; | ||
color:#319795; | ||
line-height:1.4; | ||
|
||
} |
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
Oops, something went wrong.