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

fix: make notes red #952

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/ui/src/AttendanceCard/UserAttendance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const UserAttendance: React.FC<Props> = ({
<p className="w-fit text-gray-600 text-xs mt-2 ml-4 border-b-[1px] border-gray-400">
{t(AttendanceAria.TrainerNotes)}
</p>
<p className="text-gray-600 text-xs px-2 pt-1 pb-2">{bookingNotes}</p>
<p className="text-red-700 text-xs px-2 pt-1 pb-2">{bookingNotes}</p>
</div>
)}
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/IntervalCard/NotesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ const NotesSection: React.FC<NotesSectionProps> = ({
<Form className={className}>
<FastField
name="bookingNotes"
className="w-full h-full min-h-[105px] border-t border-gray-300"
className="w-full h-full min-h-[105px] border-t border-gray-300 "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick. Unneeded space before closing quotes. Can be changed in a future PR, even unrelated, or left as is: it won't hurt after all.

innerClassName="text-red-700"
component={TextareaEditable}
isEditing={isEditing}
placeholder={t(BookingNotesForm.Placeholder)}
// Fast field runs some sort of memoization
// by switching the key (when 'isEditing' is toggled)
// we're ensuring the component gets rerendered (from 'p' to 'textarea' in this case)
Expand All @@ -73,7 +73,7 @@ const NotesSection: React.FC<NotesSectionProps> = ({
</HoverText>
<div className="absolute right-2 top-1/2 -translate-y-1/2 flex gap-1">
<IconButton
className="text-red-500"
className="text-red-700"
{...actionButtonProps}
type="reset"
>
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/TextareaEditable/TextareaEditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type TextareaEditableProps = React.HTMLAttributes<HTMLElement> &
*/
isEditing?: boolean;
value?: string;
innerClassName?: string;
};

/**
Expand All @@ -17,6 +18,7 @@ type TextareaEditableProps = React.HTMLAttributes<HTMLElement> &
const TextareaEditable: React.FC<TextareaEditableProps> = ({
isEditing,
className: inputClasses = "",
innerClassName: inputInnerClasses = "",
field = {},
...initialProps
}) => {
Expand All @@ -42,6 +44,7 @@ const TextareaEditable: React.FC<TextareaEditableProps> = ({
// If there's no value, we might show a placeholder (even outside edit mode)
// so it should be colored as such
value ? "text-gray-900" : "text-gray-400",
inputInnerClasses,
];

return (
Expand Down
Loading