Skip to content

Commit

Permalink
improving error styles
Browse files Browse the repository at this point in the history
  • Loading branch information
colevscode committed Sep 25, 2024
1 parent 389b6c5 commit 53d351c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/astro-react-demo/src/components/ContactForm.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@
.contact-form .error {
color: #dc3545;
font-size: 14px;
margin-top: -10px;
margin-bottom: 10px;
margin-top: 10px;
}
8 changes: 6 additions & 2 deletions examples/astro-react-demo/src/components/ContactForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function ContactForm() {
prefix="Email"
field="email"
errors={state.errors}
className="error-message"
className="error"
/>
<label htmlFor="message" className="form-label">
Message
Expand All @@ -39,11 +39,15 @@ function ContactForm() {
prefix="Message"
field="message"
errors={state.errors}
className="error-message"
className="error"
/>
<button type="submit" disabled={state.submitting} className="submit-button">
Submit
</button>
<ValidationError
errors={state.errors}
className="error"
/>
</form>
);
}
Expand Down

0 comments on commit 53d351c

Please sign in to comment.