groundfloor-react-ui 1.2.5 → 1.2.6
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/DesignComponent/StyledComponent/StyledComponent.js +15 -1
- package/components/Form/FormComponent.js +10 -5
- package/components/Form/index.js +0 -1
- package/components/Inputs/NumericInput.js +1 -0
- package/components/Inputs/PasswordInput.js +1 -1
- package/components/Inputs/TextInput.js +1 -1
- package/dist/index.es.js +102 -101
- package/dist/index.js +102 -101
- package/package.json +1 -1
- package/components/Form/FormWrapper.js +0 -15
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import styled from "styled-components";
|
|
2
3
|
|
|
3
4
|
export const PageContent = styled.div`
|
|
@@ -309,4 +310,17 @@ export const MultiColumnDiv = styled.div`
|
|
|
309
310
|
max-width: 48%;
|
|
310
311
|
min-width: 48%;
|
|
311
312
|
|
|
312
|
-
`;
|
|
313
|
+
`;
|
|
314
|
+
|
|
315
|
+
const Wrapper = styled.form`
|
|
316
|
+
width: 40vw;
|
|
317
|
+
display: flex;
|
|
318
|
+
justify-content: center;
|
|
319
|
+
flex-direction: column;
|
|
320
|
+
gap: 20px;
|
|
321
|
+
${({ customStyles }) => customStyles}
|
|
322
|
+
`;
|
|
323
|
+
|
|
324
|
+
export const FormWrapper = ({ customStyles, children }) => {
|
|
325
|
+
return <Wrapper customStyles={customStyles}>{children}</Wrapper>;
|
|
326
|
+
};
|
|
@@ -3,7 +3,9 @@ import { PrimaryButton, SecondaryButton, TinyButton } from '../Button';
|
|
|
3
3
|
import defaultThemeColor from '../constants/defaultThemeColor';
|
|
4
4
|
import {
|
|
5
5
|
FormContainer,
|
|
6
|
-
|
|
6
|
+
FormWrapper,
|
|
7
|
+
MultiColumnDiv,
|
|
8
|
+
MultiColumnWrapper
|
|
7
9
|
} from '../DesignComponent';
|
|
8
10
|
import { Header } from '../Header';
|
|
9
11
|
import {
|
|
@@ -23,7 +25,6 @@ import {
|
|
|
23
25
|
import { Label } from '../Label';
|
|
24
26
|
import { Rating } from '../Rating';
|
|
25
27
|
import { Table } from '../Tables';
|
|
26
|
-
import { FormWrapper } from './FormWrapper';
|
|
27
28
|
import { HeaderComponent } from './HeaderComponent';
|
|
28
29
|
|
|
29
30
|
|
|
@@ -101,11 +102,15 @@ export const FormComponent = ({ formData, customStyles, ...props }) => {
|
|
|
101
102
|
};
|
|
102
103
|
|
|
103
104
|
const AsyncMultiDropdownInput = (item) => {
|
|
104
|
-
return
|
|
105
|
+
return (
|
|
106
|
+
<DropdownSelect dropdownType={'asyncMultiSelect'} {...item} {...props} />
|
|
107
|
+
);
|
|
105
108
|
};
|
|
106
109
|
|
|
107
110
|
const AsyncSingleDropdownInput = (item) => {
|
|
108
|
-
return
|
|
111
|
+
return (
|
|
112
|
+
<DropdownSelect dropdownType={'asyncSingleSelect'} {...item} {...props} />
|
|
113
|
+
);
|
|
109
114
|
};
|
|
110
115
|
|
|
111
116
|
const signatureInput = (item) => {
|
|
@@ -214,7 +219,7 @@ export const FormComponent = ({ formData, customStyles, ...props }) => {
|
|
|
214
219
|
return (
|
|
215
220
|
<Fragment>
|
|
216
221
|
<FormContainer defaultThemeColor={defaultThemeColor}>
|
|
217
|
-
<FormWrapper onSubmit={handleSubmit} customStyles={customStyles}
|
|
222
|
+
<FormWrapper onSubmit={handleSubmit} customStyles={customStyles}>
|
|
218
223
|
{formData.map((row, i) => {
|
|
219
224
|
if (row.length > 1) {
|
|
220
225
|
return (
|
package/components/Form/index.js
CHANGED