Skip to content

Commit

Permalink
fix(form): update submit sentiment to default instead of success (#2743)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthprost authored Jul 19, 2023
1 parent 0e3c36d commit 283e601
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-schools-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ultraviolet/form': patch
---

Fix submit button color
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ exports[`Submit form is invalid 1`] = `
padding-top: 2px;
}
.cache-1nwzvbz {
.cache-z5af6 {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
Expand Down Expand Up @@ -140,14 +140,14 @@ exports[`Submit form is invalid 1`] = `
line-height: 24px;
paragraph-spacing: 0;
text-case: none;
background: #2c8564;
background: #521094;
border: none;
color: #ffffff;
background: #adebd5;
background: #e5dbfd;
color: #ffffff;
}
.cache-1nwzvbz:hover {
.cache-z5af6:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
Expand Down Expand Up @@ -178,7 +178,7 @@ exports[`Submit form is invalid 1`] = `
</div>
</div>
<button
class="cache-1nwzvbz e112qvla2"
class="cache-z5af6 e112qvla2"
disabled=""
type="submit"
>
Expand All @@ -190,7 +190,7 @@ exports[`Submit form is invalid 1`] = `

exports[`Submit form is submitting 1`] = `
<DocumentFragment>
.cache-1nwzvbz {
.cache-z5af6 {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
Expand Down Expand Up @@ -224,14 +224,14 @@ exports[`Submit form is submitting 1`] = `
line-height: 24px;
paragraph-spacing: 0;
text-case: none;
background: #2c8564;
background: #521094;
border: none;
color: #ffffff;
background: #adebd5;
background: #e5dbfd;
color: #ffffff;
}
.cache-1nwzvbz:hover {
.cache-z5af6:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
Expand All @@ -250,7 +250,7 @@ exports[`Submit form is submitting 1`] = `
novalidate=""
>
<button
class="cache-1nwzvbz e112qvla2"
class="cache-z5af6 e112qvla2"
disabled=""
type="submit"
>
Expand Down Expand Up @@ -294,7 +294,7 @@ exports[`Submit form is submitting 1`] = `

exports[`Submit renders correctly 1`] = `
<DocumentFragment>
.cache-1ri7fk0 {
.cache-1mhgaz3 {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
Expand Down Expand Up @@ -328,31 +328,31 @@ exports[`Submit renders correctly 1`] = `
line-height: 24px;
paragraph-spacing: 0;
text-case: none;
background: #2c8564;
background: #521094;
border: none;
color: #ffffff;
}
.cache-1ri7fk0:hover {
.cache-1mhgaz3:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
.cache-1ri7fk0:active {
box-shadow: 0px 0px 0px 3px #45D19F40;
.cache-1mhgaz3:active {
box-shadow: 0px 0px 0px 3px #5e127e40;
}
.cache-1ri7fk0:hover,
.cache-1ri7fk0:active {
background: #297c5e;
.cache-1mhgaz3:hover,
.cache-1mhgaz3:active {
background: #3b1a61;
color: #f9f9fa;
}
<form
novalidate=""
>
<button
class="cache-1ri7fk0 e112qvla2"
class="cache-1mhgaz3 e112qvla2"
type="submit"
>
Test
Expand All @@ -363,7 +363,7 @@ exports[`Submit renders correctly 1`] = `

exports[`Submit renders correctly with icon and iconPosition 1`] = `
<DocumentFragment>
.cache-u948y7 {
.cache-136ta4n {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
Expand Down Expand Up @@ -397,23 +397,23 @@ exports[`Submit renders correctly with icon and iconPosition 1`] = `
line-height: 24px;
paragraph-spacing: 0;
text-case: none;
background: #2c8564;
background: #521094;
border: none;
color: #ffffff;
}
.cache-u948y7:hover {
.cache-136ta4n:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
.cache-u948y7:active {
box-shadow: 0px 0px 0px 3px #45D19F40;
.cache-136ta4n:active {
box-shadow: 0px 0px 0px 3px #5e127e40;
}
.cache-u948y7:hover,
.cache-u948y7:active {
background: #297c5e;
.cache-136ta4n:hover,
.cache-136ta4n:active {
background: #3b1a61;
color: #f9f9fa;
}
Expand All @@ -430,7 +430,7 @@ exports[`Submit renders correctly with icon and iconPosition 1`] = `
novalidate=""
>
<button
class="cache-u948y7 e112qvla2"
class="cache-136ta4n e112qvla2"
type="submit"
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/components/Submit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Submit = ({
iconPosition,
size,
variant = 'filled',
sentiment = 'success',
sentiment = 'primary',
tooltip,
}: SubmitProps): JSX.Element => {
const { invalid, submitting, hasValidationErrors, dirtySinceLastSubmit } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`SubmitErrorAlert should display an alert when submitError is present 1`] = `
<DocumentFragment>
.cache-1ri7fk0 {
.cache-1mhgaz3 {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
Expand Down Expand Up @@ -36,23 +36,23 @@ exports[`SubmitErrorAlert should display an alert when submitError is present 1`
line-height: 24px;
paragraph-spacing: 0;
text-case: none;
background: #2c8564;
background: #521094;
border: none;
color: #ffffff;
}
.cache-1ri7fk0:hover {
.cache-1mhgaz3:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
.cache-1ri7fk0:active {
box-shadow: 0px 0px 0px 3px #45D19F40;
.cache-1mhgaz3:active {
box-shadow: 0px 0px 0px 3px #5e127e40;
}
.cache-1ri7fk0:hover,
.cache-1ri7fk0:active {
background: #297c5e;
.cache-1mhgaz3:hover,
.cache-1mhgaz3:active {
background: #3b1a61;
color: #f9f9fa;
}
Expand Down Expand Up @@ -187,7 +187,7 @@ exports[`SubmitErrorAlert should display an alert when submitError is present 1`
novalidate=""
>
<button
class="cache-1ri7fk0 e112qvla2"
class="cache-1mhgaz3 e112qvla2"
type="submit"
>
Submit
Expand Down

0 comments on commit 283e601

Please sign in to comment.