Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added label to painscale preview #7994

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,24 @@ let make = (
: <div>
<div className="grid grid-cols-1 items-center gap-4 justify-around mt-4">
<div className="flex flex-col items-center text-center">
<div className="text-black font-bold text-xl">
<div className="text-black font-bold text-xl flex items-center gap-2">
{str(Belt.Float.toString(painScale))}
<div
className={"text-sm font-bold text-white px-2 py-1 rounded-lg"}
style={ReactDOMStyle.make(
~backgroundColor=Js.String2.make(
switch getLabels(Belt.Float.toInt(painScale)) {
| (_, color) => color
},
),
(),
)}>
{str(
switch getLabels(Belt.Float.toInt(painScale)) {
| (label, _) => label
},
)}
</div>
</div>
<div className="text-sm text-gray-700"> {str("Pain Scale")} </div>
</div>
Expand All @@ -159,7 +175,7 @@ let make = (
? <button
type_="button"
onClick={e => {
if (painScale == 0.0) {
if painScale == 0.0 {
hideModal(e)
} else {
updatePart(state)
Expand Down
Loading