-
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
1 parent
d10694e
commit d33b3ca
Showing
5 changed files
with
80 additions
and
19 deletions.
There are no files selected for viewing
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,41 @@ | ||
import React from 'react'; | ||
import { Button } from '@components/ui/Buttons/Button'; | ||
import { Frown, Annoyed, Smile, Laugh } from 'lucide-react'; | ||
import { AverageScoreResponse } from '@/types/SurveyType'; | ||
|
||
interface HappinessButtonProps { | ||
score: AverageScoreResponse | number; | ||
} | ||
|
||
const HappinessButton: React.FC<HappinessButtonProps> = ({ score }) => { | ||
if (score === null) return null; | ||
|
||
if (score === 1) { | ||
return ( | ||
<Button variant="mood" disabled size="mood" className="flex items-center justify-center bg-tertiaryBG-light"> | ||
<Frown className="h-12 w-12 text-black" /> | ||
</Button> | ||
); | ||
} | ||
if (score === 2) { | ||
return ( | ||
<Button variant="mood" disabled size="mood" className="flex items-center justify-center bg-primaryRed-light"> | ||
<Annoyed className="h-12 w-12 text-primaryRed-main" /> | ||
</Button> | ||
); | ||
} else if (score === 3) { | ||
return ( | ||
<Button variant="mood" disabled size="mood" className="flex items-center justify-center bg-primaryBlue-light"> | ||
<Smile className="h-12 w-12 text-primaryBlue-main" /> | ||
</Button> | ||
); | ||
} else { | ||
return ( | ||
<Button variant="mood" disabled size="mood" className="flex items-center justify-center bg-primaryGreen-light"> | ||
<Laugh className="h-12 w-12 text-primaryGreen-main" /> | ||
</Button> | ||
); | ||
} | ||
}; | ||
|
||
export default HappinessButton; |
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