Finished update
This commit is contained in:
@ -32,7 +32,6 @@ import { changeTheme } from './components/theme/theme';
|
||||
* @author Ovsyanikov Maxim
|
||||
*/
|
||||
export class CGSelect implements ICgSelect {
|
||||
// Select settings
|
||||
selector?: string;
|
||||
selected?: string;
|
||||
placeholder?: string;
|
||||
@ -466,10 +465,6 @@ export class CGSelect implements ICgSelect {
|
||||
* @method initEvent
|
||||
*/
|
||||
private initEvent() {
|
||||
if (!this.event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.event) {
|
||||
if (this.event === 'mouseenter') {
|
||||
this.element!.addEventListener(this.event, () => {
|
||||
@ -771,7 +766,7 @@ export class CGSelect implements ICgSelect {
|
||||
* @returns {HTMLElement} returns a reference to the selected HTML element.
|
||||
* @method getElement
|
||||
*/
|
||||
public getElement(numberItem: number): IItems[] | string[] | any {
|
||||
public getElement(numberItem: number): IItems[] | any {
|
||||
if (numberItem > this.items.length) {
|
||||
return;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ export function changeTheme(element: Element, theme: string) {
|
||||
const list = element!.querySelector('ul.list');
|
||||
const search = element!.querySelector('.inputSearch');
|
||||
const path = element.querySelectorAll('.pathWhite');
|
||||
const nativeSelect = element.querySelector('.nativeSelect');
|
||||
|
||||
select!.classList.remove('classicSelect');
|
||||
list!.classList.remove('classicList');
|
||||
@ -12,10 +13,11 @@ export function changeTheme(element: Element, theme: string) {
|
||||
elem.classList.remove('pathWhite');
|
||||
});
|
||||
|
||||
switch (theme) {
|
||||
switch (theme.toLowerCase()) {
|
||||
case 'dark':
|
||||
select!.classList.add('selectDark');
|
||||
list!.classList.add('listDark');
|
||||
nativeSelect?.classList.add('listDark');
|
||||
path.forEach((elem) => {
|
||||
elem.classList.add('pathWhite');
|
||||
});
|
||||
@ -24,6 +26,7 @@ export function changeTheme(element: Element, theme: string) {
|
||||
select!.classList.add('selectWhite');
|
||||
caret!.classList.add('caretWhite');
|
||||
list!.classList.add('listWhite');
|
||||
nativeSelect?.classList.add('listWhite');
|
||||
path.forEach((elem) => {
|
||||
elem.classList.add('pathBlack');
|
||||
});
|
||||
|
BIN
src/images/logoCG2.ico
Normal file
BIN
src/images/logoCG2.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 264 KiB |
Reference in New Issue
Block a user