Skip to content

Commit

Permalink
Merge pull request #535 from cornell-dti/dka34/Select-Styling-Fix
Browse files Browse the repository at this point in the history
Fixing the styling issue in Students page etc
  • Loading branch information
Atikpui007 authored Oct 5, 2024
2 parents 5eb347e + 60067ef commit 661966e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 4 additions & 0 deletions frontend/src/components/RideModal/Pages/RideTimes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ const RideTimesPage: React.FC<RideTimesProps> = ({
},
})}
aria-required="true"
className={cn(styles.dateStyle)}
/>
{errors.date?.type === 'required' && (
<p className={styles.error}>Please enter a date</p>
Expand All @@ -211,6 +212,7 @@ const RideTimesPage: React.FC<RideTimesProps> = ({
{...register('repeats', {
required: 'Please select a repeat option',
})}
className={cn(styles.selectInputContainer, styles.selectInput)}
>
{repeatOptions.map((option) => (
<option key={option.id} value={option.id}>
Expand All @@ -228,6 +230,7 @@ const RideTimesPage: React.FC<RideTimesProps> = ({
<Input
id="pickupTime"
type="time"
className={cn(styles.timeStyle)}
{...register('pickupTime', {
required: true,
validate: (pickupTime: string) => {
Expand All @@ -250,6 +253,7 @@ const RideTimesPage: React.FC<RideTimesProps> = ({
<Input
id="dropoffTime"
type="time"
className={cn(styles.timeStyle)}
{...register('dropoffTime', {
required: true,
validate: (dropoffTime: string) => {
Expand Down
16 changes: 4 additions & 12 deletions frontend/src/components/RideModal/ridemodal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
}

/* Input styles */
input[type='date'],
input[type='time'],
select {
.dateStyle,
.timeStyle,
.selectInputContainer {
width: 100%;
padding: 0.75rem;
font-size: 1rem;
Expand All @@ -37,16 +37,8 @@ select {
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type='date']:focus,
input[type='time']:focus,
select:focus {
outline: none;
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Styled select */
select {
.selectInput {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
Expand Down

0 comments on commit 661966e

Please sign in to comment.