imbric-theme 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,9 @@ import DynamicSelect from '../../molecules/DynamicSelect'
7
7
  import DatePicker from '../../molecules/DatePicker'
8
8
  import Label from '../../atoms/Label'
9
9
  import Icon from '../../atoms/Icon'
10
+ import Button from '../../atoms/Button'
10
11
  import { Horizontal, Vertical } from '../../layout/Spacer/components'
11
- import LoadingError from '../../molecules/LoadingError'
12
+ // import LoadingError from '../../molecules/LoadingError'
12
13
  // import ColumnTable from '../../molecules/ColumnTable'
13
14
  // import RowTable from '../../molecules/RowTable'
14
15
  // import FooterTable from '../../molecules/FooterTable'
@@ -16,7 +17,7 @@ import LoadingError from '../../molecules/LoadingError'
16
17
  // import useStateDate from '../../hook/useStateDate';
17
18
 
18
19
 
19
- export const DynamicTable = ({ getStyles, optionsData, opColumns, opAddColumns, isLayoutDate, isViewRange, isViewAddColumn, isViewDownloadDoc, handleAddColumn, handleSelectRange, handleDownloadExcel, handleDefaultValue, labelDinamicSelect, placeholderDinamicSelect, isLoadingDinamicSelect, labelSinceDateRange, labelTillDateRange }) => {
20
+ export const DynamicTable = ({ getStyles, optionsData, opColumns, opAddColumns, isLayoutDate, isViewRange, isViewAddColumn, isViewBtn, isViewDownloadDoc, typeBtn, titleBtn, handleBtn, handleAddColumn, handleSelectRange, handleDownloadExcel, handleDefaultValue, labelDinamicSelect, placeholderDinamicSelect, isLoadingDinamicSelect, labelSinceDateRange, labelTillDateRange }) => {
20
21
 
21
22
  const [tableData, setTableData] = useState(optionsData);
22
23
  const [columnsData, setColumnsData] = useState(opColumns);
@@ -120,7 +121,26 @@ export const DynamicTable = ({ getStyles, optionsData, opColumns, opAddColumns,
120
121
 
121
122
  </div>
122
123
  ) : null}
124
+
123
125
  <Horizontal size="md" />
126
+
127
+ {isViewBtn ? (
128
+ <div className={getStyles('opFunctionBox3')}>
129
+
130
+ <Button
131
+ type={typeBtn}
132
+ isInline={true}
133
+ onClick={handleBtn}
134
+ >
135
+ {titleBtn}
136
+ </Button>
137
+
138
+ <Horizontal size="md" />
139
+
140
+ </div>
141
+ ) : null}
142
+
143
+
124
144
  {isViewDownloadDoc ? (
125
145
  <div className={getStyles('opFunctionBox3')}>
126
146
  <Icon
@@ -158,6 +178,7 @@ DynamicTable.propTypes = {
158
178
  isViewRange: PropTypes.bool,
159
179
  isViewAddColumn: PropTypes.bool,
160
180
  isViewDownloadDoc: PropTypes.bool,
181
+ isViewBtn: PropTypes.bool,
161
182
  onChangeInput: PropTypes.func,
162
183
  handleAddColumn: PropTypes.func,
163
184
  isError: PropTypes.string,
@@ -168,6 +189,9 @@ DynamicTable.propTypes = {
168
189
  placeholderDinamicSelect: PropTypes.string,
169
190
  labelSinceDateRange: PropTypes.string,
170
191
  labelTillDateRange: PropTypes.string,
192
+ typeBtn: PropTypes.string,
193
+ titleBtn: PropTypes.string,
194
+ handleBtn: PropTypes.func,
171
195
  }
172
196
 
173
197
  DynamicTable.defaultProps = {
@@ -176,6 +200,7 @@ DynamicTable.defaultProps = {
176
200
  isViewRange: true,
177
201
  isViewAddColumn: true,
178
202
  isViewDownloadDoc: true,
203
+ isViewBtn: false,
179
204
  isLayoutDate: 'Calendar',
180
205
  handleSelectRange: () => { },
181
206
  handleDownloadExcel: () => { },
@@ -183,6 +208,9 @@ DynamicTable.defaultProps = {
183
208
  placeholderDinamicSelect: 'Seleccionar columnas',
184
209
  labelSinceDateRange: 'Desde',
185
210
  labelTillDateRange: 'Hasta',
211
+ typeBtn: 'primary',
212
+ titleBtn: '',
213
+ handleBtn: () => { },
186
214
  }
187
215
 
188
216
  export default withStyles(styles)(DynamicTable)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Components library IMBRIC",
5
5
  "private": false,
6
6
  "main": "index.js",