groundfloor-react-ui 1.2.3 → 1.2.5
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/components/Avatar/AvatarSBfooter.js +1 -3
- package/components/Button/PrimaryButton.js +1 -1
- package/components/Cards/DocumentCard.js +126 -126
- package/components/Cards/index.js +1 -1
- package/components/Content/Content.js +1 -2
- package/components/Content/index.js +1 -1
- package/components/DesignComponent/StyledComponent/StyledComponent.js +1 -21
- package/components/DesignComponent/StyledComponent/index.js +1 -1
- package/components/DesignComponent/index.js +1 -1
- package/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/components/Footer/Footer.js +1 -2
- package/components/Footer/FooterContent.js +1 -3
- package/components/Footer/index.js +2 -1
- package/components/Form/FormComponent.js +6 -4
- package/components/Form/FormWrapper.js +15 -0
- package/components/Form/SubmitComponent.js +1 -1
- package/components/Form/index.js +3 -0
- package/components/GroupButtons/ButtonPopup.js +2 -2
- package/components/GroupButtons/GroupButtons.js +1 -1
- package/components/GroupButtons/index.js +1 -1
- package/components/GroupStatusCircle/GroupStatusCircle.js +1 -1
- package/components/Header/Header.js +2 -2
- package/components/HyperLink/HyperLink.js +2 -2
- package/components/Icon/Icon.js +46 -46
- package/components/Inputs/ColorInput.js +47 -46
- package/components/Inputs/DropdownSelect.js +18 -14
- package/components/Inputs/DropzoneInput.js +1 -1
- package/components/Inputs/NumericInput.js +5 -5
- package/components/Inputs/PasswordInput.js +5 -5
- package/components/Inputs/RadioInput.js +12 -12
- package/components/Inputs/Signature.js +1 -1
- package/components/Inputs/TextInput.js +4 -4
- package/components/Inputs/TimeInput.js +1 -1
- package/components/Label/Label.js +8 -8
- package/components/Loaders/Loader.js +3 -3
- package/components/Modal/ModalComp.js +44 -50
- package/components/Overlay/Overlay.js +2 -2
- package/components/Pagination/Pagination.js +17 -17
- package/components/ProgressSteps/ProgressSteps.js +1 -1
- package/components/SecondaryLink/DarkSecondaryLink.js +1 -1
- package/components/SecondaryLink/LightSecondaryLink.js +1 -1
- package/components/SecondaryLink/index.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/index.js +1 -1
- package/components/StatusChip/PrimaryStatusChip.js +1 -1
- package/components/StatusChip/SecondaryStatusChip.js +1 -1
- package/components/StatusChip/SlimPrimaryStatusChip.js +1 -1
- package/components/StatusChip/SlimSecondaryStatusChip.js +1 -1
- package/components/StatusCircle/StatusCircle.js +1 -1
- package/components/Tooltip/Tooltip.js +279 -279
- package/components/constants/defaultStyle.js +20 -20
- package/components/constants/defaultThemeColor.js +1 -1
- package/components/global/FontStyle.js +10 -10
- package/dist/index.es.js +305 -309
- package/dist/index.js +253 -257
- package/package.json +1 -1
package/components/Icon/Icon.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { ReactSVG } from "react-svg";
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import defaultThemeColor from '../constants/defaultThemeColor';
|
|
6
6
|
|
|
7
7
|
/** import icons from assets here */
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
8
|
+
import appLogo from '../../assets/icons/app-logo.svg';
|
|
9
|
+
import arrowDown from '../../assets/icons/arrow-down.svg';
|
|
10
|
+
import arrowRotate from '../../assets/icons/arrow-rotate.svg';
|
|
11
|
+
import arrowUp from '../../assets/icons/arrow-up.svg';
|
|
12
|
+
import bell from '../../assets/icons/bell.svg';
|
|
13
|
+
import checkIcon from '../../assets/icons/check.svg';
|
|
14
|
+
import checkMark from '../../assets/icons/checkmark.svg';
|
|
15
|
+
import chevronDown from '../../assets/icons/chevron-down.svg';
|
|
16
|
+
import chevronLeft from '../../assets/icons/chevron-left.svg';
|
|
17
|
+
import chevronRight from '../../assets/icons/chevron-right.svg';
|
|
18
|
+
import cloudIcon from '../../assets/icons/cloud-icon.svg';
|
|
19
|
+
import connection from '../../assets/icons/connection.svg';
|
|
20
|
+
import crossIcon from '../../assets/icons/cross-icon.svg';
|
|
21
|
+
import defaultIcon from '../../assets/icons/default.svg';
|
|
22
|
+
import doorInternalActive from '../../assets/icons/door-internal-active.svg';
|
|
23
|
+
import editIcon from '../../assets/icons/edit-icon.svg';
|
|
24
|
+
import ellipsesHorizontal from '../../assets/icons/ellipses-horizontal.svg';
|
|
25
|
+
import ellipses from '../../assets/icons/ellipses.svg';
|
|
26
|
+
import email from '../../assets/icons/email.svg';
|
|
27
|
+
import eyeView from '../../assets/icons/eye-hide-view.svg';
|
|
28
|
+
import eyeHide from '../../assets/icons/eye-hide.svg';
|
|
29
|
+
import fileAttachWhite from '../../assets/icons/file-attach-white.svg';
|
|
30
|
+
import fileAttach from '../../assets/icons/file-attach.svg';
|
|
31
|
+
import fileIcon from '../../assets/icons/file-icon.svg';
|
|
32
|
+
import fileUpload from '../../assets/icons/file-upload.svg';
|
|
33
|
+
import equation from '../../assets/icons/functional-equation-regular.svg';
|
|
34
|
+
import hamburgerMenu from '../../assets/icons/hamburger-menu.svg';
|
|
35
|
+
import info from '../../assets/icons/info.svg';
|
|
36
|
+
import jpgIcon from '../../assets/icons/jpg-icon.svg';
|
|
37
|
+
import magnifier from '../../assets/icons/magnifier.svg';
|
|
38
|
+
import menuEllipseTwo from '../../assets/icons/menu-ellipse-two.svg';
|
|
39
|
+
import menuEllipse from '../../assets/icons/menu-ellipse.svg';
|
|
40
|
+
import pauseAll from '../../assets/icons/pause-all.svg';
|
|
41
|
+
import pdfIcon from '../../assets/icons/pdf-icon.svg';
|
|
42
|
+
import penIcon from '../../assets/icons/pen-icon.svg';
|
|
43
|
+
import plusOutline from '../../assets/icons/plus-outlined.svg';
|
|
44
|
+
import resume from '../../assets/icons/resume.svg';
|
|
45
|
+
import signIcon from '../../assets/icons/sign-icon.svg';
|
|
46
|
+
import star from '../../assets/icons/star.svg';
|
|
47
|
+
import trashIcon from '../../assets/icons/trash-icon.svg';
|
|
48
|
+
import triangleDown from '../../assets/icons/triangle-down.svg';
|
|
49
|
+
import user from '../../assets/icons/users.svg';
|
|
50
|
+
import view from '../../assets/icons/view.svg';
|
|
51
|
+
import watcher from '../../assets/icons/watcher.svg';
|
|
52
|
+
import zoomInWhite from '../../assets/icons/zoom-in-white.svg';
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
/** icon name should be kebab-case, e.g "plus-outline" */
|
|
@@ -15,8 +15,8 @@ background-color: ${({ theme }) => theme.bgColor};
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
${({ inBuiltCss, defaultColorWrapperStyle }) => {
|
|
18
|
-
|
|
19
|
-
}}
|
|
18
|
+
return getDefaultStyles(inBuiltCss, defaultColorWrapperStyle);
|
|
19
|
+
}}
|
|
20
20
|
// custom styles
|
|
21
21
|
${({ customColorWrapperStyle }) => customColorWrapperStyle}
|
|
22
22
|
|
|
@@ -41,8 +41,8 @@ padding: 0;
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
${({ inBuiltCss, defaultInputColorStyle }) => {
|
|
44
|
-
|
|
45
|
-
}}
|
|
44
|
+
return getDefaultStyles(inBuiltCss, defaultInputColorStyle);
|
|
45
|
+
}}
|
|
46
46
|
// custom styles
|
|
47
47
|
${({ customInputColorStyle }) => customInputColorStyle}
|
|
48
48
|
`;
|
|
@@ -57,45 +57,46 @@ export const ColorInput = ({
|
|
|
57
57
|
customColorWrapperStyle,
|
|
58
58
|
id,
|
|
59
59
|
...props
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
}) => {
|
|
61
|
+
const activeTheme = useTheme() || defaultThemeColor;
|
|
62
62
|
return (
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
<ColorWrapper customColorWrapperStyle={customColorWrapperStyle}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
defaultColorWrapperStyle={'ColorWrapper'}
|
|
66
|
+
theme={activeTheme}
|
|
67
|
+
inBuiltCss={defaultStyles}
|
|
68
|
+
{...props}>
|
|
69
|
+
|
|
70
|
+
<InputColor
|
|
71
71
|
id={id}
|
|
72
72
|
customInputColorStyle={customInputColorStyle}
|
|
73
|
-
defaultInputColorStyle={'input-color'}
|
|
73
|
+
defaultInputColorStyle={'input-color'}
|
|
74
74
|
inBuiltCss={defaultStyles}
|
|
75
75
|
theme={activeTheme}
|
|
76
76
|
{...props}
|
|
77
77
|
type="color"
|
|
78
78
|
value={value}
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
onChange={
|
|
81
|
-
(e)=>{
|
|
82
|
-
setValue(e.target.value)
|
|
83
|
-
/>
|
|
84
|
-
<Label
|
|
85
|
-
themeColor={defaultThemeColor}
|
|
86
|
-
customStyles={labelStyle}
|
|
87
|
-
type={'label-text'}
|
|
88
|
-
text={label}
|
|
89
|
-
style={{
|
|
90
|
-
display: 'flex',
|
|
91
|
-
paddingBottom: '0px',
|
|
92
|
-
paddingLeft: '10px'
|
|
81
|
+
(e) => {
|
|
82
|
+
setValue(e.target.value)
|
|
93
83
|
}}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
/>
|
|
85
|
+
<Label
|
|
86
|
+
themeColor={defaultThemeColor}
|
|
87
|
+
customStyles={labelStyle}
|
|
88
|
+
type={'label-text'}
|
|
89
|
+
text={label}
|
|
90
|
+
style={{
|
|
91
|
+
display: 'flex',
|
|
92
|
+
paddingBottom: '0px',
|
|
93
|
+
paddingLeft: '10px'
|
|
94
|
+
}}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
|
|
97
98
|
</ColorWrapper>
|
|
98
|
-
|
|
99
|
+
|
|
99
100
|
);
|
|
100
101
|
};
|
|
101
102
|
|
|
@@ -107,8 +108,8 @@ ColorInput.propTypes = {
|
|
|
107
108
|
/**
|
|
108
109
|
* Label style of ColorInput
|
|
109
110
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
labelStyle: PropTypes.object,
|
|
112
|
+
|
|
112
113
|
/**
|
|
113
114
|
* color value of input
|
|
114
115
|
*/
|
|
@@ -124,21 +125,21 @@ ColorInput.propTypes = {
|
|
|
124
125
|
/**
|
|
125
126
|
* custom style of the wrapper around the color-input
|
|
126
127
|
*/
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
customColorWrapperStyle: PropTypes.object,
|
|
129
|
+
/**
|
|
130
|
+
* id of the colorInput
|
|
131
|
+
*/
|
|
132
|
+
id: PropTypes.string
|
|
132
133
|
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
ColorInput.defaultProps ={
|
|
136
|
-
label: '',
|
|
137
|
-
labelStyle: {},
|
|
138
|
-
customInputColorStyle: {},
|
|
139
|
-
customColorWrapperStyle: {},
|
|
140
|
-
value: '#FFFFFF',
|
|
141
|
-
setValue: ()=>{ },
|
|
142
|
-
id: ''
|
|
136
|
+
ColorInput.defaultProps = {
|
|
137
|
+
label: '',
|
|
138
|
+
labelStyle: {},
|
|
139
|
+
customInputColorStyle: {},
|
|
140
|
+
customColorWrapperStyle: {},
|
|
141
|
+
value: '#FFFFFF',
|
|
142
|
+
setValue: () => { },
|
|
143
|
+
id: ''
|
|
143
144
|
};
|
|
144
145
|
|
|
@@ -118,11 +118,18 @@ const Wrapper = styled.div`
|
|
|
118
118
|
color:${({ theme }) => theme.textColor} !important;
|
|
119
119
|
margin-right: 0px;
|
|
120
120
|
}
|
|
121
|
+
.text-main-alt-value {
|
|
122
|
+
color:${({ theme }) => theme.textColor} !important;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
text-overflow: ellipsis;
|
|
126
|
+
|
|
127
|
+
}
|
|
121
128
|
.text-more-alt{
|
|
122
129
|
font-size:12px;
|
|
123
130
|
color: ${({ theme }) => theme.neutral['neutral-2']};
|
|
124
131
|
padding-right: 0px;
|
|
125
|
-
|
|
132
|
+
|
|
126
133
|
|
|
127
134
|
}
|
|
128
135
|
.css-mohuvp-dummyInput-DummyInput{
|
|
@@ -252,20 +259,12 @@ export const DropdownSelect = ({
|
|
|
252
259
|
)}
|
|
253
260
|
|
|
254
261
|
{children}
|
|
255
|
-
{len > 1 && <
|
|
262
|
+
{len > 1 && <span className={`text-more-alt`}>& {len - 1} more</span>}
|
|
256
263
|
</components.ValueContainer>
|
|
257
264
|
);
|
|
258
265
|
};
|
|
259
266
|
|
|
260
|
-
|
|
261
|
-
const len = getValue().length;
|
|
262
|
-
return (
|
|
263
|
-
<components.ValueContainer {...props}>
|
|
264
|
-
{children}
|
|
265
|
-
{len > 1 && <div className={`text-more-alt`}>& {len - 1} more</div>}
|
|
266
|
-
</components.ValueContainer>
|
|
267
|
-
);
|
|
268
|
-
};
|
|
267
|
+
|
|
269
268
|
|
|
270
269
|
const Option = (p) => {
|
|
271
270
|
const checkboxStyle = {
|
|
@@ -312,7 +311,7 @@ export const DropdownSelect = ({
|
|
|
312
311
|
|
|
313
312
|
const MultiValue = ({ index, ...p }) => {
|
|
314
313
|
const firstSelected = p?.data?.label || 'Select';
|
|
315
|
-
return !index && <
|
|
314
|
+
return !index && <span className='text-main-alt-value'>{firstSelected}</span>;
|
|
316
315
|
};
|
|
317
316
|
|
|
318
317
|
const stylesComp = {
|
|
@@ -321,7 +320,7 @@ export const DropdownSelect = ({
|
|
|
321
320
|
border: !isValid
|
|
322
321
|
? '1px solid ' + activeTheme.ui['error']
|
|
323
322
|
: '1px solid ' + activeTheme.border,
|
|
324
|
-
minWidth: '
|
|
323
|
+
minWidth: '226px',
|
|
325
324
|
height: `${height}px`,
|
|
326
325
|
minHeight: `${height}px`,
|
|
327
326
|
boxShadow: (state.isSelected || state.isFocused) && 'none',
|
|
@@ -350,6 +349,7 @@ export const DropdownSelect = ({
|
|
|
350
349
|
valueContainer: (base) => ({
|
|
351
350
|
...base,
|
|
352
351
|
display: 'flex',
|
|
352
|
+
justifyContent: 'space-between',
|
|
353
353
|
fontSize: fontSize + 'px',
|
|
354
354
|
}),
|
|
355
355
|
indicatorsContainer: (base) => ({
|
|
@@ -368,6 +368,7 @@ export const DropdownSelect = ({
|
|
|
368
368
|
borderRadius: '4.32px',
|
|
369
369
|
fontSize: fontSize + 'px',
|
|
370
370
|
width: '100%',
|
|
371
|
+
minWidth: '226px',
|
|
371
372
|
}),
|
|
372
373
|
singleValue: (base) => ({
|
|
373
374
|
...base,
|
|
@@ -652,6 +653,9 @@ DropdownSelect.propTypes = {
|
|
|
652
653
|
* iconSize of the select
|
|
653
654
|
*/
|
|
654
655
|
leftIconSize: PropTypes.number,
|
|
656
|
+
/**
|
|
657
|
+
* to show or hide indicator
|
|
658
|
+
*/
|
|
655
659
|
showIndicator: PropTypes.bool,
|
|
656
660
|
};
|
|
657
661
|
|
|
@@ -679,7 +683,7 @@ DropdownSelect.defaultProps = {
|
|
|
679
683
|
iconName: 'triangle-down',
|
|
680
684
|
iconColor: 'black',
|
|
681
685
|
iconSize: 8,
|
|
682
|
-
leftIcon: '
|
|
686
|
+
leftIcon: '',
|
|
683
687
|
leftIconColor: 'black',
|
|
684
688
|
leftIconSize: 10,
|
|
685
689
|
showIndicator: true,
|
|
@@ -149,10 +149,10 @@ NumericInput.propTypes = {
|
|
|
149
149
|
* custom style of input element
|
|
150
150
|
*/
|
|
151
151
|
inputStyle: PropTypes.object,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
/**
|
|
153
|
+
* id of the number input
|
|
154
|
+
*/
|
|
155
|
+
id: PropTypes.string,
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
NumericInput.defaultProps = {
|
|
@@ -161,5 +161,5 @@ NumericInput.defaultProps = {
|
|
|
161
161
|
labelInline: false,
|
|
162
162
|
inputStyle: {},
|
|
163
163
|
inputValue: null,
|
|
164
|
-
id:''
|
|
164
|
+
id: ''
|
|
165
165
|
};
|
|
@@ -154,10 +154,10 @@ export const PasswordInput = ({
|
|
|
154
154
|
inBuiltCss={defaultStyles}
|
|
155
155
|
{...props}
|
|
156
156
|
/>
|
|
157
|
-
{showHideIcon === true ?
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
{showHideIcon === true ?
|
|
158
|
+
<div className='input-icon' onClick={() => setShowEye(!showEye)}>
|
|
159
|
+
{showEye ? <Icon icon='eye-show' /> : <Icon icon='eye-hide' />}
|
|
160
|
+
</div> : ''
|
|
161
161
|
}
|
|
162
162
|
</TextWrapper>
|
|
163
163
|
{passwordRules ? <div style={{ ...rulesStyle, marginLeft: '5px' }}>{passwordRules}</div> : ''}
|
|
@@ -220,7 +220,7 @@ PasswordInput.propTypes = {
|
|
|
220
220
|
/**
|
|
221
221
|
* hide icon shows or not
|
|
222
222
|
*/
|
|
223
|
-
|
|
223
|
+
showHideIcon: PropTypes.bool,
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
PasswordInput.defaultProps = {
|
|
@@ -214,16 +214,16 @@ RadioInput.propTypes = {
|
|
|
214
214
|
/**
|
|
215
215
|
* RadioButton Contents i.e:-
|
|
216
216
|
[
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
217
|
+
{
|
|
218
|
+
label: 'First Radio Button',
|
|
219
|
+
value: 'first',
|
|
220
|
+
disabled: true,
|
|
221
|
+
disabledColor: '#ae3232',
|
|
222
|
+
id: '1'
|
|
223
|
+
},
|
|
224
|
+
{ label: 'Second Radio Button', value: 'second', id: '2' },
|
|
225
|
+
{ label: 'Third Radio Button', value: 'third', id: '3' },
|
|
226
|
+
]
|
|
227
227
|
*/
|
|
228
228
|
options: PropTypes.array,
|
|
229
229
|
/**
|
|
@@ -231,8 +231,8 @@ RadioInput.propTypes = {
|
|
|
231
231
|
*/
|
|
232
232
|
optionStyle: PropTypes.object,
|
|
233
233
|
/**
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
* RadioButton wraperdiv style object
|
|
235
|
+
*/
|
|
236
236
|
WrapperDivStyle: PropTypes.object,
|
|
237
237
|
/**
|
|
238
238
|
* RadioButton checked value
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import SignaturePad from 'react-signature-pad-wrapper';
|
|
4
4
|
import styled, { useTheme } from 'styled-components';
|
|
5
5
|
import defaultStyles from '../constants/defaultStyle';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import defaultThemeColor from '../constants/defaultThemeColor';
|
|
5
4
|
import defaultStyles from '../constants/defaultStyle';
|
|
5
|
+
import defaultThemeColor from '../constants/defaultThemeColor';
|
|
6
6
|
import getDefaultStyles from '../constants/utils';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const LabelLayout = styled.label`
|
|
9
9
|
//Set the styles from the default styles object
|
|
10
|
-
${
|
|
10
|
+
${({ theme, type }) => {
|
|
11
11
|
return getDefaultStyles(theme, type);
|
|
12
|
-
|
|
12
|
+
}}
|
|
13
13
|
|
|
14
14
|
// custom styles
|
|
15
|
-
${({customStyles})=>customStyles}
|
|
15
|
+
${({ customStyles }) => customStyles}
|
|
16
16
|
`;
|
|
17
17
|
|
|
18
|
-
export const Label = ({ customStyles, text, className,required, ...props }) => {
|
|
18
|
+
export const Label = ({ customStyles, text, className, required, ...props }) => {
|
|
19
19
|
const theme = defaultStyles;
|
|
20
20
|
return (
|
|
21
21
|
<LabelLayout required={required} theme={theme} customStyles={customStyles} type={'label'} {...props}>
|
|
@@ -42,7 +42,7 @@ Label.propTypes = {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
Label.defaultProps = {
|
|
45
|
-
text:''
|
|
45
|
+
text: ''
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled, { keyframes, css } from "styled-components";
|
|
3
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled, { css, keyframes } from "styled-components";
|
|
4
4
|
import defaultStyles from '../constants/defaultStyle';
|
|
5
5
|
|
|
6
6
|
const ldsSpinner = keyframes`
|
|
@@ -128,7 +128,7 @@ const Spinner = styled.div`
|
|
|
128
128
|
}
|
|
129
129
|
`
|
|
130
130
|
|
|
131
|
-
export const Loader = ({
|
|
131
|
+
export const Loader = ({ size, thickness, propellerHeight, customStyles }) => {
|
|
132
132
|
const theme = defaultStyles;
|
|
133
133
|
|
|
134
134
|
return (
|