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.
@@ -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
- MultiColumnDiv, MultiColumnWrapper
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 <DropdownSelect dropdownType={'asyncMultiSelect'} {...item} {...props} />;
105
+ return (
106
+ <DropdownSelect dropdownType={'asyncMultiSelect'} {...item} {...props} />
107
+ );
105
108
  };
106
109
 
107
110
  const AsyncSingleDropdownInput = (item) => {
108
- return <DropdownSelect dropdownType={'asyncSingleSelect'} {...item} {...props} />;
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 (
@@ -1,5 +1,4 @@
1
1
  export * from './FormComponent';
2
- export * from './FormWrapper';
3
2
  export * from './HeaderComponent';
4
3
  export * from './SubmitComponent';
5
4
 
@@ -31,6 +31,7 @@ TextBox.defaultProps = {
31
31
  };
32
32
 
33
33
  const Input = styled.input`
34
+ width: 85%;
34
35
  border: 0;
35
36
  outline: 0;
36
37
  color: ${({ theme }) => theme.variant['primary-2']};
@@ -43,7 +43,7 @@ TextWrapper.defaultProps = {
43
43
  };
44
44
 
45
45
  const Input = styled.input`
46
- width: auto;
46
+ width: 85%;
47
47
  -webkit-text-security: ${({ showEye }) => showEye ? 'none' : 'disc'} ;
48
48
 
49
49
  //Set the styles from the default styles object
@@ -37,7 +37,7 @@ const TextWrapper = styled.div`
37
37
  `;
38
38
 
39
39
  const Input = styled.input`
40
- width: 98%;
40
+ width: 85%;
41
41
  //Set the styles from the default styles object
42
42
  ${({ inBuiltCss, defaultInputStyle }) => {
43
43
  return getDefaultStyles(inBuiltCss, defaultInputStyle);