Skip to content

Commit

Permalink
removed unnecessary checked prop
Browse files Browse the repository at this point in the history
  • Loading branch information
fraincs committed May 21, 2024
1 parent 02f4e77 commit c7e9615
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
25 changes: 20 additions & 5 deletions packages/components/src/button/src/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ a.o-ui-button {
/* PRIMARY | SELECTED / SELECTED + ACTIVE */
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"],
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"]:active,
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active {
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active,
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"],
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"]:active,
.o-ui-button-primary:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"].o-ui-button-active {
background-color: var(--hop-primary-surface-selected);
border-color: var(--hop-primary-border-selected);
color: var(--hop-primary-text-selected);
Expand Down Expand Up @@ -168,7 +171,10 @@ a.o-ui-button {
/* UPSELL | SELECTED / SELECTED + ACTIVE */
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"],
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"]:active,
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active {
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active,
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"],
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"]:active,
.o-ui-button-upsell:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"].o-ui-button-active {
background-color: var(--hop-upsell-surface-selected);
border-color: var(--hop-upsell-border-selected);
color: var(--hop-upsell-text-selected);
Expand Down Expand Up @@ -215,7 +221,10 @@ a.o-ui-button {
/* SECONDARY | SELECTED / SELECTED + ACTIVE */
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"],
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"]:active,
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active {
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active,
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"],
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"]:active,
.o-ui-button-secondary:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"].o-ui-button-active {
background-color: var(--hop-neutral-surface-selected);
border-color: var(--hop-neutral-surface-selected);
color: var(--hop-neutral-text-selected);
Expand Down Expand Up @@ -270,7 +279,10 @@ a.o-ui-button {
/* TERTIARY | SELECTED / SELECTED + ACTIVE */
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"],
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active,
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"]:active {
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"]:active,
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-checked="true"],
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-checked="true"].o-ui-button-active,
.o-ui-button-tertiary:not(.o-ui-button-inherit-style):not([disabled]):not(.o-ui-button-loading)[aria-checked="true"]:active {
background-color: var(--hop-neutral-surface-press);
color: var(--hop-neutral-text-press);
}
Expand Down Expand Up @@ -314,7 +326,10 @@ a.o-ui-button {
/* NEGATIVE | SELECTED / SELECTED + ACTIVE */
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"],
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"]:active,
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active {
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-pressed="true"].o-ui-button-active,
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"],
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"]:active,
.o-ui-button-negative:not([disabled]):not(.o-ui-button-loading)[aria-checked="true"].o-ui-button-active {
background-color: var(--hop-danger-surface-selected);
border-color: var(--hop-danger-border-selected);
color: var(--hop-danger-text-selected);
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/button/src/useToggleButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function useToggleButton({
return {
buttonProps: {
active: active,
checked: isChecked,
onClick: handleClick,
ref: forwardedRef,
value,
Expand Down

0 comments on commit c7e9615

Please sign in to comment.