@woosmap/ui 4.49.0 → 4.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.49.0",
3
+ "version": "4.50.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -88,6 +88,9 @@ class Modal extends Component {
88
88
  validateCb,
89
89
  validateBtnProps,
90
90
  mainButtonType,
91
+ mainButtonClass,
92
+ mainButtonIcon,
93
+ mainButtonIconSize,
91
94
  testId,
92
95
  loadingLayer,
93
96
  } = this.props;
@@ -111,6 +114,9 @@ class Modal extends Component {
111
114
  )}
112
115
  <Button
113
116
  type={mainButtonType}
117
+ className={mainButtonClass}
118
+ icon={mainButtonIcon}
119
+ iconSize={mainButtonIconSize}
114
120
  testId={`${testId}-validate-button`}
115
121
  label={labelValidate || tr('Validate')}
116
122
  onClick={this.validate}
@@ -199,6 +205,9 @@ Modal.defaultProps = {
199
205
  defaultIsOpen: false,
200
206
  validateBtnProps: {},
201
207
  mainButtonType: 'primary',
208
+ mainButtonClass: null,
209
+ mainButtonIcon: null,
210
+ mainButtonIconSize: null,
202
211
  testId: 'modal',
203
212
  closesWithEscape: false,
204
213
  displayCloseButtonOutside: false,
@@ -223,6 +232,9 @@ Modal.propTypes = {
223
232
  labelValidate: PropTypes.string,
224
233
  validateBtnProps: PropTypes.object,
225
234
  mainButtonType: PropTypes.string,
235
+ mainButtonClass: PropTypes.string,
236
+ mainButtonIcon: PropTypes.string,
237
+ mainButtonIconSize: PropTypes.number,
226
238
  testId: PropTypes.string,
227
239
  closesWithEscape: PropTypes.bool,
228
240
  displayCloseButtonOutside: PropTypes.bool,
@@ -30,7 +30,14 @@ const Template = () => {
30
30
  return (
31
31
  <div style={{ paddingLeft: '50px' }}>
32
32
  <Button onClick={open} label="Open modal" />
33
- <Modal mainButtonType="important" ref={modalRef} title="My modal" validateCb={validate}>
33
+ <Modal
34
+ mainButtonClass="btn--demo"
35
+ mainButtonIcon="play"
36
+ mainButtonIconSize={20}
37
+ ref={modalRef}
38
+ title="My modal"
39
+ validateCb={validate}
40
+ >
34
41
  content
35
42
  </Modal>
36
43
  </div>