@@ -84,16 +84,38 @@ import { reducer, epics } from '@flipbyte/redux-datatable';
84
84
[' Limiter' , ' Spacer' , ' ResultCount' , ' Spacer' , ' Pages' ],
85
85
],
86
86
components: {
87
+ Header: {
88
+ rowClassName: ' your custom class names' ,
89
+ colClassName: ' your custom class names' ,
90
+ className: ' your custom class names' ,
91
+ },
92
+ Body: {
93
+ rowClassName: ' your custom class names' ,
94
+ colClassName: ' your custom class names' ,
95
+ className: ' your custom class names' ,
96
+ },
97
+ Filters: {
98
+ rowClassName: ' your custom class names' ,
99
+ colClassName: ' your custom class names' ,
100
+ className: ' your custom class names' ,
101
+ },
87
102
Loader: {
88
103
styles: {
89
104
mask: { ... },
90
105
spinner: { ... }
91
106
}
92
107
},
93
108
ResultCount: {
109
+ className: ' your custom class names' ,
94
110
styles: { ... }
95
111
},
96
112
Pages: {
113
+ firstClassName: ' your custom class names' ,
114
+ lastClassName: ' your custom class names' ,
115
+ nextClassName: ' your custom class names' ,
116
+ prevClassName: ' your custom class names' ,
117
+ pageNumberClassName: ' your custom class names' ,
118
+ activeClassName: ' your custom class names' ,
97
119
styles: {
98
120
first: { ... },
99
121
last: { ... },
@@ -109,6 +131,11 @@ import { reducer, epics } from '@flipbyte/redux-datatable';
109
131
hide: ' Hide editable' ,
110
132
save: ' Save' ,
111
133
},
134
+ classNames: {
135
+ show: ' your custom class names' ,
136
+ hide: ' your custom class names' ,
137
+ save: ' your custom class names' ,
138
+ },
112
139
save : ( config ) => ( dispatch , getState ) => {
113
140
const tableState = getState ()[config .reducerName ][config .name ];
114
141
console .log (' toolbar save click with modified data' , config, tableState .modified );
@@ -127,6 +154,10 @@ import { reducer, epics } from '@flipbyte/redux-datatable';
127
154
name: ' actions' ,
128
155
label: ' Actions' ,
129
156
id: ' dropdown' ,
157
+ className: ' your custom class names' ,
158
+ btnClassName: ' your custom class names' ,
159
+ menuClassName: ' your custom class names' ,
160
+ menuItemClassName: ' your custom class names' ,
130
161
styles: {
131
162
button: { ... },
132
163
dropdownMenu: { ... },
@@ -159,24 +190,31 @@ import { reducer, epics } from '@flipbyte/redux-datatable';
159
190
SimpleButton: {
160
191
type: ' button' ,
161
192
label: ' Simple Button' ,
193
+ className: ' your custom class names' ,
162
194
thunk : ( config ) => ( dispatch , getState ) => { ... },
163
195
styles: { ... }
164
196
},
165
197
ResetFilters: {
166
198
type: ' reset-filters' ,
167
199
label: ' Reset Filters' ,
200
+ className: ' your custom class names' ,
168
201
styles: { ... }
169
202
},
170
203
Print: {
171
204
type: ' print' ,
172
205
label: ' Print Table' ,
206
+ className: ' your custom class names' ,
173
207
styles: { ... }
174
208
},
175
209
Columns: {
176
210
name: ' columns' ,
177
211
type: ' columns' ,
178
212
label: ' Columns' ,
179
213
visible: true ,
214
+ className: ' your custom class names' ,
215
+ btnClassName: ' your custom class names' ,
216
+ menuClassName: ' your custom class names' ,
217
+ menuItemClassName: ' your custom class names' ,
180
218
styles: {
181
219
button: { ... },
182
220
dropdownMenu: { ... },
@@ -187,9 +225,12 @@ import { reducer, epics } from '@flipbyte/redux-datatable';
187
225
type: ' limiter' ,
188
226
options: [10 , 20 , 50 , 200 , 2000 , 0 ],
189
227
default: 200 ,
228
+ className: ' your custom class names' ,
229
+ selectClassName: ' your custom class names' ,
190
230
styles: { ... }
191
231
},
192
232
Table: {
233
+ className: ' your custom class names' ,
193
234
styles: {
194
235
table: { ... },
195
236
thead: { ... },
@@ -359,11 +400,12 @@ Note: Check the [example](https://github.com/flipbyte/redux-datatable/blob/maste
359
400
360
401
** _ Common Properties_ **
361
402
362
- | Key | Type | Required | Default | Description |
363
- | -------- | -------- | -------- | ------- | -------------------------------------------------------------------------------------------------- |
364
- | styles | object | false | {} | styled-component styles object or key-value pairs with values being styled-component styles object |
365
- | renderer | function | false | - | returns a react component |
366
- | type | string | true | - | the type of the object |
403
+ | Key | Type | Required | Default | Description |
404
+ | --------- | -------- | -------- | ------- | -------------------------------------------------------------------------------------------------- |
405
+ | styles | object | false | {} | styled-component styles object or key-value pairs with values being styled-component styles object |
406
+ | renderer | function | false | - | returns a react component |
407
+ | type | string | true | - | the type of the object |
408
+ | className | string | true | varies | html class names for top-level html element in the component |
367
409
368
410
##### Loader
369
411
@@ -382,6 +424,17 @@ No unique properties
382
424
383
425
##### Pages
384
426
427
+ ** _ Properties_ **
428
+
429
+ | Key | Type | Required | Default | Description |
430
+ | ------------------- | ------ | -------- | ------------ | ---------------- |
431
+ | firstClassName | string | false | rdt-pg-first | html class names |
432
+ | lastClassName | string | false | rdt-pg-last | html class names |
433
+ | prevClassName | string | false | rdt-pg-prev | html class names |
434
+ | nextClassName | string | false | rdt-pg-next | html class names |
435
+ | pageNumberClassName | string | false | rdt-pg-num | html class names |
436
+ | activeClassName | string | false | active | html class names |
437
+
385
438
** _ Styles object properties_ **
386
439
387
440
| Key | Type | Required | Default | Description |
@@ -398,10 +451,19 @@ Toggles the table between editable and non-editable and shows a save button when
398
451
399
452
** _ Properties_ **
400
453
401
- | Key | Type | Required | Default | Description |
402
- | ------ | -------- | -------- | ----------- | ----------------------------------------------- |
403
- | labels | object | false | check below | check below |
404
- | save | function | false | - | ( config ) => ( dispatch, getState ) => { ... } |
454
+ | Key | Type | Required | Default | Description |
455
+ | ---------- | -------- | -------- | ----------- | ----------------------------------------------- |
456
+ | labels | object | false | check below | check below |
457
+ | save | function | false | - | ( config ) => ( dispatch, getState ) => { ... } |
458
+ | classNames | object | false | check below | check below |
459
+
460
+ ** _ classNames object properties_ **
461
+
462
+ | Key | Type | Required | Default | Description |
463
+ | ---- | ------ | -------- | ---------------------- | ---------------- |
464
+ | show | string | false | rdt-toolbar-button | html class names |
465
+ | hide | string | false | rdt-toolbar-button | html class names |
466
+ | save | string | false | Sardt-toolbar-buttonve | html class names |
405
467
406
468
** _ Labels object properties_ **
407
469
@@ -423,10 +485,13 @@ Toggles the table between editable and non-editable and shows a save button when
423
485
424
486
** _ Properties_ **
425
487
426
- | Key | Type | Required | Default | Description |
427
- | ------- | ------ | -------- | ------- | ------------------------------------- |
428
- | options | array | required | \[ ] | array of actions objects |
429
- | label | string | required | - | Label for the actions dropdown button |
488
+ | Key | Type | Required | Default | Description |
489
+ | ----------------- | ------ | -------- | ------------------ | ------------------------------------- |
490
+ | options | array | true | \[ ] | array of actions objects |
491
+ | label | string | true | - | Label for the actions dropdown button |
492
+ | btnClassName | string | false | rdt-toolbar-button | html class names |
493
+ | menuClassName | string | false | rdt-toolbar-menu | html class names |
494
+ | menuItemClassName | string | false | rdt-toolbar-item | html class names |
430
495
431
496
** _ Actions object properties_ **
432
497
@@ -477,9 +542,12 @@ Shows the columns toggling dropdown.
477
542
478
543
** _ Properties_ **
479
544
480
- | Key | Type | Required | Default | Description |
481
- | ----- | ------ | -------- | ------- | ------------------------------------- |
482
- | label | string | required | - | Label for the actions dropdown button |
545
+ | Key | Type | Required | Default | Description |
546
+ | ----------------- | ------ | -------- | ------------------ | ------------------------------------- |
547
+ | label | string | required | - | Label for the actions dropdown button |
548
+ | btnClassName | string | false | rdt-toolbar-button | html class names |
549
+ | menuClassName | string | false | rdt-toolbar-menu | html class names |
550
+ | menuItemClassName | string | false | rdt-toolbar-item | html class names |
483
551
484
552
** _ Styles object properties_ **
485
553
@@ -491,10 +559,11 @@ Shows the columns toggling dropdown.
491
559
492
560
##### Limiter (type: limiter)
493
561
494
- | Key | Type | Required | Default | Description |
495
- | ------- | ------- | -------- | ------- | --------------------------------------------------------------------- |
496
- | options | array | required | \[ ] | array of limiter counts |
497
- | default | integer | required | \[ ] | default limiter option (should be a value in the options array above) |
562
+ | Key | Type | Required | Default | Description |
563
+ | --------------- | ------- | -------- | ------------------ | --------------------------------------------------------------------- |
564
+ | options | array | required | \[ ] | array of limiter counts |
565
+ | default | integer | required | \[ ] | default limiter option (should be a value in the options array above) |
566
+ | selectClassName | string | false | rdt-limiter-select | html class names |
498
567
499
568
##### Table (type: table)
500
569
0 commit comments