Skip to content

Commit

Permalink
decrease font size (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelaZQ1 authored Oct 19, 2023
1 parent 20a9436 commit f584773
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
14 changes: 8 additions & 6 deletions packages/frontend-v2/components/Sidebar/SectionRequirement.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from "@chakra-ui/react";
import { Box, Text } from "@chakra-ui/react";
import {
IAndCourse2,
ICourseRange2,
Expand Down Expand Up @@ -50,7 +50,9 @@ const SectionRequirement: React.FC<SidebarRequirementProps> = ({
const renderXOM = (requirement: IXofManyCourse) => {
return (
<div>
<p>Complete {requirement.numCreditsMin} credits from the following</p>
<Text fontSize="sm">
Complete {requirement.numCreditsMin} credits from the following
</Text>
{requirement.courses.map((course, index) => (
<SectionRequirement
requirement={course}
Expand All @@ -66,7 +68,7 @@ const SectionRequirement: React.FC<SidebarRequirementProps> = ({
const renderAND = (requirement: IAndCourse2) => {
return (
<div>
<p>Complete all of the following</p>
<Text fontSize="sm">Complete all of the following</Text>
{requirement.courses.map((course, index) => (
<SectionRequirement
requirement={course}
Expand All @@ -82,7 +84,7 @@ const SectionRequirement: React.FC<SidebarRequirementProps> = ({
const renderOR = (requirement: IOrCourse2) => {
return (
<div>
<p>Complete one of the following</p>
<Text fontSize="sm">Complete one of the following</Text>
{requirement.courses.map((course, index) => (
<SectionRequirement
requirement={course}
Expand All @@ -97,7 +99,7 @@ const SectionRequirement: React.FC<SidebarRequirementProps> = ({

const renderRange = (requirement: ICourseRange2) => {
return (
<p>
<Text fontSize="sm">
Complete any course in range {requirement.subject}
{requirement.idRangeStart} to {requirement.subject}
{requirement.idRangeEnd}{" "}
Expand All @@ -110,7 +112,7 @@ const SectionRequirement: React.FC<SidebarRequirementProps> = ({
.slice(0, -1)}
</>
)}
</p>
</Text>
);
};

Expand Down
14 changes: 10 additions & 4 deletions packages/frontend-v2/components/Sidebar/SidebarSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,18 @@ const SidebarSection: React.FC<SidebarSectionProps> = ({
*/}
<CheckIcon
position="absolute"
opacity={validationStatus === SidebarValidationStatus.Complete ? 1 : 0}
opacity={
validationStatus === SidebarValidationStatus.Complete ? 1 : 0
}
transition="opacity 0.25s ease"
transitionDelay="0.1s"
boxSize="9px"
/>
<SmallCloseIcon
position="absolute"
opacity={validationStatus === SidebarValidationStatus.Error ? 1 : 0}
opacity={
validationStatus === SidebarValidationStatus.Error ? 1 : 0
}
transition="opacity 0.25s ease"
transitionDelay="0.1s"
boxSize="13px"
Expand All @@ -130,7 +134,9 @@ const SidebarSection: React.FC<SidebarSectionProps> = ({
size="xs"
color="grey"
position="absolute"
opacity={validationStatus === SidebarValidationStatus.Loading ? 1 : 0}
opacity={
validationStatus === SidebarValidationStatus.Loading ? 1 : 0
}
transition="opacity 0.25s ease"
transitionDelay="0.1s"
/>
Expand Down Expand Up @@ -167,7 +173,7 @@ const SidebarSection: React.FC<SidebarSectionProps> = ({
{opened && !loading && (
<>
{section.minRequirementCount < section.requirements.length && (
<Text>
<Text fontSize="sm">
Complete {section.minRequirementCount} of the following
</Text>
)}
Expand Down

0 comments on commit f584773

Please sign in to comment.