/
configuration.ts
42 lines (40 loc) · 1.77 KB
/
configuration.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { ComponentsConfiguration } from './core/types'
import * as Components from '@/components'
const mergeConfiguration = (userConfiguration: ComponentsConfiguration = {}) => {
// Merge Vanilla Components Configuration with the user configuration
// Return Both Merged Configuration
return Object.assign(
{
Avatar: Components.avatarConfig,
Button: Components.buttonConfig,
Card: Components.cardConfig,
Checkbox: Components.checkboxConfig,
CountryInput: Components.countryInputConfig,
Datatable: Components.datatableConfig,
DateTimeInput: Components.dateTimeInputConfig,
Dialog: Components.dialogConfig,
Dropdown: Components.dropdownConfig,
FormErrors: Components.formsConfig,
FormFeedback: Components.formsConfig,
FormLabel: Components.formsConfig,
FormSection: Components.formsConfig,
Input: Components.inputConfig,
InputGroup: Components.inputGroupConfig,
PhoneInput: Components.phoneInputConfig,
RichRadio: Components.richRadioConfig,
RichRadioOption: Components.richRadioOptionConfig,
RichSelect: Components.richSelectConfig,
RichSelectOptionWithImage: Components.richSelectOptionWithImageConfig,
RichSelectOptionWithIndicators: Components.richSelectOptionWithIndicatorsConfig,
RichSelectTagWithImage: Components.richSelectTagWithImageConfig,
Select: Components.selectConfig,
SkeletonBar: Components.skeletonBarConfig,
Slideover: Components.slideoverConfig,
StatusIndicator: Components.statusIndicatorConfig,
Textarea: Components.textareaConfig,
Toggle: Components.toggleConfig,
},
userConfiguration,
)
}
export default mergeConfiguration