Skip to content

Commit

Permalink
fixed text issue
Browse files Browse the repository at this point in the history
text extended out past borders of box and would not wrap around. Added break-words and removed box height to allow box to extend down if needed
  • Loading branch information
jmill-16 committed Nov 14, 2024
1 parent 5eace2f commit a6fdd77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/private/volunteer/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const VolunteerHomePage = () => {
return (
<div>
<h1> Volunteer Home</h1>
<DashboardAlert Title="Importance: change to Saturday (10/12) schedule" Subtext="bla blo ble bla blo ble haha hihi hoho ..."/>
<DashboardAlert Title="Importance: change to Saturday (10/12) schedule. Extra text is getting typed here because I need to test if the title wraps correctly to the next line." Subtext="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,"/>
</div>
);
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/DashboardAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ const DashboardAlert = ({ Title, Subtext }: DashboardAlertProps) => {
</div>

{/* Main Content Box */}
<div className="flex flex-col shadow-md w-[1094px] h-[116px] p-[24px] px-[28px] items-start gap-[16px] rounded-tr-[8px] rounded-br-[8px] border border-[#FF8B14] bg-[#FFF] relative">
<div className="text-[#101828] text-lg font-bold font-['Sofia Pro'] leading-normal">
<div className="flex flex-col shadow-md w-[1094px] p-[24px] px-[28px] items-start gap-[16px] rounded-tr-[8px] rounded-br-[8px] border border-[#FF8B14] bg-[#FFF] relative">
<div className="pr-[32px] text-[#101828] text-lg font-bold font-['Sofia Pro'] leading-normal break-words">
{Title}
</div>
<div className="text-[#344054] text-base font-normal font-['Sofia Pro'] leading-normal">
<div className="text-[#344054] text-base font-normal font-['Sofia Pro'] leading-normal break-words">
{Subtext}
</div>

Expand Down

0 comments on commit a6fdd77

Please sign in to comment.