Skip to content

[Feat]: #1466 Add disabled/placeholder styles for the main components #1815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
add disabled styles for toggled button
  • Loading branch information
iamfaran committed Jun 26, 2025
commit 864a887ff3afaa15da7573e8f97886c04b3786c3
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { trans } from "i18n";
import styled from "styled-components";
import { ChangeEventHandlerControl } from "../../controls/eventHandlerControl";
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../../generators/withExposing";
import { Button100, ButtonCompWrapper, buttonRefMethods } from "./buttonCompConstants";
import { Button100, ButtonCompWrapper, buttonRefMethods, DisabledButtonStyleControl } from "./buttonCompConstants";
import { IconControl } from "comps/controls/iconControl";
import { AlignWithStretchControl, LeftRightControl } from "comps/controls/dropdownControl";
import { booleanExposingStateControl } from "comps/controls/codeStateControl";
Expand Down Expand Up @@ -63,6 +63,7 @@ const ToggleTmpComp = (function () {
iconPosition: LeftRightControl,
alignment: AlignWithStretchControl,
style: styleControl(ToggleButtonStyle , 'style'),
disabledStyle: DisabledButtonStyleControl,
animationStyle: styleControl(AnimationStyle , 'animationStyle'),
showBorder: withDefault(BoolControl, true),
viewRef: RefControl<HTMLElement>,
Expand All @@ -84,6 +85,7 @@ const ToggleTmpComp = (function () {
<Button100
ref={props.viewRef}
$buttonStyle={props.style}
$disabledStyle={props.disabledStyle}
loading={props.loading}
disabled={props.disabled}
onClick={() => {
Expand Down Expand Up @@ -153,6 +155,7 @@ const ToggleTmpComp = (function () {
</>
)}

<Section name="Disabled">{children.disabledStyle.getPropertyView()}</Section>
</>
))
.setExposeMethodConfigs(buttonRefMethods)
Expand Down