Skip to content

Commit 31d1448

Browse files
committed
Update Contact form tests after removing required from project type
1 parent a516671 commit 31d1448

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/Pages/Contact/client/feedback.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export const clearFieldFeedback = (
4343
field.input.setAttribute('aria-invalid', 'false')
4444
}
4545

46-
const setOpacity = (label: HTMLLabelElement, _hasText: boolean): void => {
47-
label.style.removeProperty('opacity')
46+
const setOpacity = (label: HTMLLabelElement, hasText: boolean): void => {
47+
label.style.opacity = hasText ? '0' : '0.5'
4848
}
4949

5050
export interface LabelController {

src/components/Pages/Contact/index.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ const { content } = Astro.props
267267
<select
268268
id="budget"
269269
name="budget"
270+
required
270271
class="w-full px-4 py-3 border-2 border-trim rounded-xl bg-note-inverse/25 focus:border-spotlight focus:ring-0 focus:outline-none focus-visible:border-spotlight focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none transition-colors duration-200 cursor-pointer"
271272
>
272273
{content.form.project.budgetOptions.map((item) => (

0 commit comments

Comments
 (0)