Skip to content

Commit

Permalink
toggle-button styling
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell committed Nov 8, 2024
1 parent b775f08 commit 742e190
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
29 changes: 16 additions & 13 deletions vuu-ui/packages/vuu-theme/css/components/toggle-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
gap: 0;
height: var(--salt-size-base);
padding: 0;


&[data-accented] {
--salt-actionable-secondary-background-active: var(
--salt-actionable-accented-background-active
);
border-color: var(--salt-container-secondary-borderColor);
}

&[data-variant="secondary"] {
--salt-actionable-secondary-background-active: var(
--salt-actionable-bold-background-active
);
--salt-container-primary-borderColor: transparent;
}

}

.saltToggleButtonGroup-horizontal .saltToggleButton {
Expand All @@ -31,19 +47,6 @@
}
}

[data-variant="primary"] {
--salt-actionable-secondary-background-active: var(
--salt-actionable-bold-background-active
);
border-color: var(--salt-container-secondary-borderColor);
}

[data-variant="secondary"] {
--salt-actionable-secondary-background-active: var(
--salt-actionable-bold-background-active
);
--salt-container-primary-borderColor: transparent;
}

.vuuStateButtonGroup {
.saltToggleButton {
Expand Down
11 changes: 6 additions & 5 deletions vuu-ui/showcase/src/examples/salt/ToggleButton.examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import "./ToggleButton.examples.css";
let displaySequence = 1;

interface ToggleButtonExampleProps {
"data-variant": ButtonProps["variant"];
"data-variant"?: ButtonProps["variant"];
"data-accented"?: boolean;
}

export const ButtonGroupWithTextOnly = (props: ToggleButtonExampleProps) => {
Expand Down Expand Up @@ -156,14 +157,14 @@ export const ToggleButtonGroupVariations = () => {
<span />
<ButtonGroupWithTextAndIcon data-variant="secondary" />

<span>CTA</span>
<ButtonGroupWithTextOnly data-variant="cta" />
<span>Accented</span>
<ButtonGroupWithTextOnly data-accented />

<span />
<ButtonGroupWithIconOnly data-variant="cta" />
<ButtonGroupWithIconOnly data-accented />

<span />
<ButtonGroupWithTextAndIcon data-variant="cta" />
<ButtonGroupWithTextAndIcon data-accented />
</div>
);
};
Expand Down

0 comments on commit 742e190

Please sign in to comment.