Skip to content

Commit a249136

Browse files
committed
change actionButtonDisabled to actionButtonState
1 parent 873b8cf commit a249136

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/Examples/Modal.example.purs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ docs = unit # make component
5454
, onRequestClose: self.setState _ { modalId = Nothing }
5555
, onActionButtonClick: notNull $ self.setState \state -> state { clicks = state.clicks + 1 }
5656
, actionButtonTitle: "Add clicks"
57-
, actionButtonDisabled: Button.Enabled
57+
, actionButtonState: Button.Enabled
5858
, size: Small
5959
, title: "Modal title -- Small"
6060
, variant: ""
@@ -79,7 +79,7 @@ docs = unit # make component
7979
, onRequestClose: self.setState _ { modalId = Nothing }
8080
, onActionButtonClick: notNull $ self.setState \state -> state { clicks = state.clicks + 1 }
8181
, actionButtonTitle: "Add clicks"
82-
, actionButtonDisabled: Button.Disabled
82+
, actionButtonState: Button.Disabled
8383
, size: Medium
8484
, title: "Modal title -- Medium"
8585
, variant: ""
@@ -101,7 +101,7 @@ docs = unit # make component
101101
, onRequestClose: self.setState _ { modalId = Nothing }
102102
, onActionButtonClick: notNull $ self.setState \state -> state { clicks = state.clicks + 1 }
103103
, actionButtonTitle: "Add clicks"
104-
, actionButtonDisabled: Button.Enabled
104+
, actionButtonState: Button.Enabled
105105
, size: Large
106106
, title: "Modal title -- Large"
107107
, variant: ""
@@ -130,7 +130,7 @@ docs = unit # make component
130130
, onRequestClose: self.setState _ { modalId = Nothing }
131131
, onActionButtonClick: notNull $ self.setState \state -> state { clicks = state.clicks + 1 }
132132
, actionButtonTitle: "Add clicks"
133-
, actionButtonDisabled: Button.Enabled
133+
, actionButtonState: Button.Enabled
134134
, size: ExtraLarge
135135
, title: "Modal title -- Extra Large"
136136
, variant: ""
@@ -176,7 +176,7 @@ docs = unit # make component
176176
, onRequestClose: self.setState _ { modalId = Nothing }
177177
, onActionButtonClick: notNull $ self.setState \state -> state { clicks = state.clicks + 1 }
178178
, actionButtonTitle: "Add clicks"
179-
, actionButtonDisabled: Button.Enabled
179+
, actionButtonState: Button.Enabled
180180
, size: Small
181181
, title: "Modal title -- Small"
182182
, variant: ""
@@ -201,7 +201,7 @@ docs = unit # make component
201201
, onRequestClose: self.setState _ { modalId = Nothing }
202202
, onActionButtonClick: notNull $ self.setState \state -> state { clicks = state.clicks + 1 }
203203
, actionButtonTitle: "Add clicks"
204-
, actionButtonDisabled: Button.Enabled
204+
, actionButtonState: Button.Enabled
205205
, size: Large
206206
, title: "Modal title -- Internall scrolling content"
207207
, variant: "internal-scrolling"

src/Lumi/Components/Modal.purs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ modalLink = make modalLinkComponent { initialState, didMount, render }
9999
self.setState _ { modalOpen = false }
100100
props.onChange value_
101101
, actionButtonTitle: props.actionButtonTitle
102-
, actionButtonDisabled: Button.Enabled
102+
, actionButtonState: Button.Enabled
103103
, size: Medium
104104
, variant: ""
105105
, closeButton: true
@@ -124,7 +124,7 @@ type CommonProps rest =
124124
{ modalOpen :: Boolean
125125
, onActionButtonClick :: Nullable (Effect Unit)
126126
, actionButtonTitle :: String
127-
, actionButtonDisabled :: Button.ButtonState
127+
, actionButtonState :: Button.ButtonState
128128
, size :: Size
129129
, variant :: String
130130
, children :: JSX
@@ -166,7 +166,7 @@ dialog = makeStateless dialogComponent render
166166
, onRequestClose: props.onRequestClose
167167
, onActionButtonClick: props.onActionButtonClick
168168
, actionButtonTitle: props.actionButtonTitle
169-
, actionButtonDisabled: Button.Enabled
169+
, actionButtonState: Button.Enabled
170170
, size: props.size
171171
, variant: "dialog"
172172
, children:
@@ -199,7 +199,7 @@ errorModal = makeStateless errorModalComponent render
199199
, onRequestClose: props.onRequestClose
200200
, onActionButtonClick: props.onActionButtonClick
201201
, actionButtonTitle: props.actionButtonTitle
202-
, actionButtonDisabled: Button.Enabled
202+
, actionButtonState: Button.Enabled
203203
, size: Small
204204
, variant: ""
205205
, children: props.children
@@ -279,7 +279,7 @@ modalPortal = toReactComponent identity modalPortalComponent
279279
, toMaybe props.onActionButtonClick # foldMap \actionFn ->
280280
Button.button Button.primary
281281
{ title = props.actionButtonTitle
282-
, buttonState = props.actionButtonDisabled
282+
, buttonState = props.actionButtonState
283283
, onPress = mkEffectFn1 \_ -> actionFn
284284
, style = R.css { marginLeft: "1.2rem" }
285285
}

0 commit comments

Comments
 (0)