Skip to content

Commit 864a887

Browse files
committed
add disabled styles for toggled button
1 parent 59452d2 commit 864a887

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/packages/lowcoder/src/comps/comps/buttonComp/toggleButtonComp.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { trans } from "i18n";
1212
import styled from "styled-components";
1313
import { ChangeEventHandlerControl } from "../../controls/eventHandlerControl";
1414
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../../generators/withExposing";
15-
import { Button100, ButtonCompWrapper, buttonRefMethods } from "./buttonCompConstants";
15+
import { Button100, ButtonCompWrapper, buttonRefMethods, DisabledButtonStyleControl } from "./buttonCompConstants";
1616
import { IconControl } from "comps/controls/iconControl";
1717
import { AlignWithStretchControl, LeftRightControl } from "comps/controls/dropdownControl";
1818
import { booleanExposingStateControl } from "comps/controls/codeStateControl";
@@ -63,6 +63,7 @@ const ToggleTmpComp = (function () {
6363
iconPosition: LeftRightControl,
6464
alignment: AlignWithStretchControl,
6565
style: styleControl(ToggleButtonStyle , 'style'),
66+
disabledStyle: DisabledButtonStyleControl,
6667
animationStyle: styleControl(AnimationStyle , 'animationStyle'),
6768
showBorder: withDefault(BoolControl, true),
6869
viewRef: RefControl<HTMLElement>,
@@ -84,6 +85,7 @@ const ToggleTmpComp = (function () {
8485
<Button100
8586
ref={props.viewRef}
8687
$buttonStyle={props.style}
88+
$disabledStyle={props.disabledStyle}
8789
loading={props.loading}
8890
disabled={props.disabled}
8991
onClick={() => {
@@ -153,6 +155,7 @@ const ToggleTmpComp = (function () {
153155
</>
154156
)}
155157

158+
<Section name="Disabled">{children.disabledStyle.getPropertyView()}</Section>
156159
</>
157160
))
158161
.setExposeMethodConfigs(buttonRefMethods)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy