Skip to content

Commit

Permalink
Merge pull request #52 from UoaWDCC/VOL-47/main-page-button-headings
Browse files Browse the repository at this point in the history
Created Main Page Button Headings
  • Loading branch information
josbadenas authored Apr 27, 2024
2 parents baea26b + cce9c20 commit ff3a96f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/src/components/MainPageButtonHeadings.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import '../styles/componentStyles/MainPageButtonHeadings.css'

const MainPageButtonHeadings = ({heading = 'defaultText', onClick}) =>{
// default onClick function
const defaultOnClick = () =>{
console.log('default action');
};
return(
<div className='buttonContainer'>
<button className = 'buttonHeading' onClick={onClick || defaultOnClick}>
{heading}
</button>
</div>
);
}


export default MainPageButtonHeadings
29 changes: 29 additions & 0 deletions web/src/styles/componentStyles/MainPageButtonHeadings.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.buttonHeading {
padding: 10px 20px;
font-size: 25.5px;
font-weight: 500;
color: black;
background-color: white;
border: 1px solid black;
border-radius: 52px;
cursor: pointer;
outline: none;
transition: background-color 0.3s, color 0.3s;
height: 60px;
width: 311px;
}

.buttonHeading:hover {
background-color: black;
color: white;

}

.buttonHeading:active {
background-color: #333;
}

.buttonContainer {
text-align: center;
padding: 20px;
}

0 comments on commit ff3a96f

Please sign in to comment.