Added new mode for created customs theme
This commit is contained in:
14
test/index.html
Normal file
14
test/index.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<!-- TODO: Удалить после окончания обновления -->
|
||||
<button class="cg-dropdown cg-dropdown_selector"></button>
|
||||
</body>
|
||||
<script src="index.js" type="module"></script>
|
||||
</html>
|
21
test/index.js
Normal file
21
test/index.js
Normal file
@ -0,0 +1,21 @@
|
||||
import { CGSelect } from '../src/cg-select';
|
||||
import { newTheme } from './test';
|
||||
|
||||
const dropdown = new CGSelect({
|
||||
selector: '.cg-dropdown_selector',
|
||||
placeholder: 'Выберите авто',
|
||||
items: [
|
||||
'BMW',
|
||||
{
|
||||
id: '213sade',
|
||||
title: 'Opel',
|
||||
value: 1,
|
||||
},
|
||||
'Mersedes',
|
||||
'MAN',
|
||||
'Ferari',
|
||||
],
|
||||
multiselect: true,
|
||||
multiselectTag: true,
|
||||
theme: newTheme,
|
||||
});
|
12
test/test.ts
Normal file
12
test/test.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { CustomThemeJson } from 'components/theme/theme.interface';
|
||||
|
||||
export const newTheme: CustomThemeJson = {
|
||||
name: 'lol',
|
||||
styles: {
|
||||
head: {
|
||||
color: 'red',
|
||||
fontSize: '18px',
|
||||
background: '#ff000066',
|
||||
},
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user