groundfloor-react-ui 1.0.11 → 1.0.14

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.
@@ -32,6 +32,8 @@ const TextWrapper = styled.div`
32
32
 
33
33
  // custom styles
34
34
  ${({ textBoxStyle }) => textBoxStyle}
35
+
36
+ background-color: ${({ isDisabled }) => isDisabled ? defaultThemeColor.variant['neutral-5'] : defaultThemeColor.bgColor}
35
37
  `;
36
38
 
37
39
  const Input = styled.input`
@@ -47,6 +49,7 @@ const Input = styled.input`
47
49
  .sc-furwcr bxRAoq {
48
50
  color: ${defaultThemeColor.variant['neutral-3']};
49
51
  }
52
+ background-color: ${({ isDisabled }) => isDisabled ? defaultThemeColor.variant['neutral-5'] : defaultThemeColor.bgColor}
50
53
  `;
51
54
 
52
55
  const inline = css`
@@ -81,6 +84,7 @@ export const TextInput = ({
81
84
  iconAfter,
82
85
  isValid,
83
86
  type,
87
+ isDisabled,
84
88
  ...props
85
89
  }) => {
86
90
  return (
@@ -113,6 +117,7 @@ export const TextInput = ({
113
117
  <TextWrapper
114
118
  required={required}
115
119
  themeColor={defaultThemeColor}
120
+ isDisabled={isDisabled}
116
121
  textBoxStyle={textBoxStyle}
117
122
  isValid={isValid}
118
123
  theme={defaultStyles}
@@ -124,6 +129,8 @@ export const TextInput = ({
124
129
  inputStyle={inputStyle}
125
130
  type={type}
126
131
  defaultInputStyle={'input-wrapper'}
132
+ isDisabled={isDisabled}
133
+ disabled={isDisabled}
127
134
  {...props}
128
135
  />
129
136
  <div className='input-icon'>{iconAfter}</div>
@@ -182,6 +189,10 @@ TextInput.propTypes = {
182
189
  * input type i.e:- text, password
183
190
  */
184
191
  type: PropTypes.string,
192
+ /**
193
+ * input field disabled or not
194
+ */
195
+ isDisabled: PropTypes.bool,
185
196
  };
186
197
 
187
198
  TextInput.defaultProps = {
@@ -198,4 +209,5 @@ TextInput.defaultProps = {
198
209
  labelStyle: {},
199
210
  inputStyle: {},
200
211
  type: 'text',
212
+ isDisabled: false
201
213
  };
@@ -77,7 +77,7 @@ const CommonDiv = styled.div`
77
77
  padding: 2rem 3rem 0rem 3rem;
78
78
  `;
79
79
 
80
- Modal.setAppElement('#root');
80
+ Modal.setAppElement(document.getElementById("__next") ? "#__next" : '#root')
81
81
 
82
82
  export const ModalComp = ({
83
83
  modalIsOpen,
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import defaultStyles from '../constants/defaultStyle';
5
5
  import { usePopperTooltip } from 'react-popper-tooltip';
6
- // import 'react-popper-tooltip/dist/styles.css';
7
6
 
8
7
  /**
9
8
  * Primary UI component for user interaction
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import defaultStyles from '../constants/defaultStyle';
5
5
  import { usePopperTooltip } from 'react-popper-tooltip';
6
- // import 'react-popper-tooltip/dist/styles.css';
7
6
 
8
7
  /**
9
8
  * Primary UI component for user interaction