-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create and add ClearGridButton to homepage
- Loading branch information
1 parent
843e17e
commit fd83fcd
Showing
4 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
frontend/src/components/clearGridButton/ClearGridButton.css
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 @@ | ||
.clear-button-container { | ||
display: flex; | ||
justify-content: center; | ||
margin-top: 20px; | ||
|
||
} | ||
|
||
.clear-button { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 0 10px; | ||
width: 60px; | ||
height: 60px; | ||
border-radius: 50%; | ||
border: none; | ||
cursor: pointer; | ||
background-color: var(--ss-blue-grotto); | ||
|
||
} | ||
|
||
.play-icon { | ||
width: 100%; | ||
height: 100%; | ||
} |
26 changes: 26 additions & 0 deletions
26
frontend/src/components/clearGridButton/ClearGridButton.tsx
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,26 @@ | ||
import React from 'react'; | ||
import { resetGrid } from "../../services/animationService"; | ||
import "./ClearGridButton.css"; | ||
|
||
const ClearGridButton: React.FC = () => { | ||
return ( | ||
<div className="clear-button-container"> | ||
<button className="clear-button" onClick={resetGrid}> | ||
<svg xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
strokeWidth={1.8} | ||
stroke="currentColor" | ||
className="size-10" | ||
> | ||
<path strokeLinecap="round" strokeLinejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" /> | ||
|
||
</svg> | ||
</button> | ||
</div> | ||
); | ||
} | ||
|
||
export default ClearGridButton; |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
display: flex; | ||
justify-content: center; | ||
margin-top: 20px; | ||
width: 268px; | ||
} | ||
|
||
.start-button { | ||
|
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