Added new mode for created customs theme

This commit is contained in:
MaxOvs19
2023-03-15 20:09:51 +03:00
parent 2659db4326
commit 2d4d774931
15 changed files with 97 additions and 84 deletions

14
test/index.html Normal file
View 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
View 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
View 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',
},
},
};