Browse Source

Move traits config to TS

ts-style-manager
Artur Arseniev 4 years ago
parent
commit
3d7d7335c2
  1. 10
      src/trait_manager/config/config.js
  2. 24
      src/trait_manager/config/config.ts

10
src/trait_manager/config/config.js

@ -1,10 +0,0 @@
export default {
stylePrefix: 'trt-',
// Specify the element to use as a container, string (query) or HTMLElement
// With the empty value, nothing will be rendered
appendTo: '',
// Default options for the target input
optionsTarget: [{ value: false }, { value: '_blank' }],
};

24
src/trait_manager/config/config.ts

@ -0,0 +1,24 @@
export interface TraitManagerConfig {
/**
* Style prefix.
* @default 'trt-'
*/
stylePrefix?: string;
/**
* Specify the element to use as a container, string (query) or HTMLElement.
* With the empty value, nothing will be rendered.
* @default ''
*/
appendTo?: string | HTMLElement;
optionsTarget: Record<string, any>[];
}
const config: TraitManagerConfig = {
stylePrefix: 'trt-',
appendTo: '',
optionsTarget: [{ value: false }, { value: '_blank' }],
};
export default config;
Loading…
Cancel
Save