-
Notifications
You must be signed in to change notification settings - Fork 967
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Embed in an Email preview (#1913)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
- Loading branch information
1 parent
3586818
commit e30f16c
Showing
2 changed files
with
66 additions
and
18 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 { | ||
ConfusedFace, | ||
FrowningFace, | ||
GrinningFaceWithSmilingEyes, | ||
GrinningSquintingFace, | ||
NeutralFace, | ||
PerseveringFace, | ||
SlightlySmilingFace, | ||
SmilingFaceWithSmilingEyes, | ||
TiredFace, | ||
WearyFace, | ||
} from "../SingleResponseCard/components/Smileys"; | ||
|
||
interface RatingSmileyProps { | ||
active: boolean; | ||
idx: number; | ||
range: number; | ||
} | ||
|
||
export function RatingSmiley({ active, idx, range }: RatingSmileyProps): JSX.Element { | ||
const activeColor = "fill-rating-fill"; | ||
const inactiveColor = "fill-none"; | ||
let icons = [ | ||
<TiredFace className={active ? activeColor : inactiveColor} />, | ||
<WearyFace className={active ? activeColor : inactiveColor} />, | ||
<PerseveringFace className={active ? activeColor : inactiveColor} />, | ||
<FrowningFace className={active ? activeColor : inactiveColor} />, | ||
<ConfusedFace className={active ? activeColor : inactiveColor} />, | ||
<NeutralFace className={active ? activeColor : inactiveColor} />, | ||
<SlightlySmilingFace className={active ? activeColor : inactiveColor} />, | ||
<SmilingFaceWithSmilingEyes className={active ? activeColor : inactiveColor} />, | ||
<GrinningFaceWithSmilingEyes className={active ? activeColor : inactiveColor} />, | ||
<GrinningSquintingFace className={active ? activeColor : inactiveColor} />, | ||
]; | ||
|
||
if (range == 7) icons = [icons[1], icons[3], icons[4], icons[5], icons[6], icons[8], icons[9]]; | ||
else if (range == 5) icons = [icons[3], icons[4], icons[5], icons[6], icons[7]]; | ||
else if (range == 4) icons = [icons[4], icons[5], icons[6], icons[7]]; | ||
else if (range == 3) icons = [icons[4], icons[5], icons[7]]; | ||
return icons[idx]; | ||
} |
e30f16c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
formbricks-com – ./apps/formbricks-com
formbricks-com-git-main-formbricks.vercel.app
formbricks-com-formbricks.vercel.app
www.formbricks.com
formbricks.com
formbricks-com.vercel.app
e30f16c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
formbricks-cloud – ./apps/web
formbricks-cloud-formbricks.vercel.app
formbricks-cloud-git-main-formbricks.vercel.app
formbricks-cloud.vercel.app
app.formbricks.com