Skip to content

Commit

Permalink
Fix errors in buttonFrom util and Checkbox styles; migration guide pa…
Browse files Browse the repository at this point in the history
…tches
  • Loading branch information
chloerice committed Oct 23, 2023
1 parent 08cdf8b commit 23f792d
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 142 deletions.
14 changes: 12 additions & 2 deletions polaris-react/src/components/Button/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,22 @@ export function buttonsFrom(
}

export function buttonFrom(
{content, onAction, ...action}: ComplexAction,
{content, onAction, plain, destructive, ...action}: ComplexAction,
overrides?: Partial<ButtonProps>,
key?: any,
) {
const variant = !overrides?.variant && plain ? 'plain' : overrides?.variant;
const tone = !overrides?.tone && destructive ? 'critical' : overrides?.tone;

return (
<Button key={key} onClick={onAction} {...action} {...overrides}>
<Button
key={key}
onClick={onAction}
tone={tone}
variant={variant}
{...action}
{...overrides}
>
{content}
</Button>
);
Expand Down
2 changes: 1 addition & 1 deletion polaris-react/src/components/Checkbox/Checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
// in order for the background color to bleed all the way to the edge of the element.
border-color: transparent;
// stylelint-disable-next-line polaris/color/function-disallowed-list -- set background color
background-color: rgba(0, 0, 0, 0.08);
background-color: rgba(--p-color-checkbox-bg-surface-disabled);
box-shadow: none;

&::before {
Expand Down
Loading

0 comments on commit 23f792d

Please sign in to comment.