Added custom theme
This commit is contained in:
@ -5,6 +5,10 @@
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.testClassRed {
|
||||
background-color: #ff8282;
|
||||
}
|
||||
|
||||
.body-example {
|
||||
background: #000000c4;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { CGSelect } from '../src/cg-select';
|
||||
import './example';
|
||||
import { newCustomTheme } from './themeTest';
|
||||
|
||||
// ------------------------------Обычный селект--------------------
|
||||
const dropdown = new CGSelect({
|
||||
@ -25,11 +26,12 @@ const dropdown = new CGSelect({
|
||||
width: '824px',
|
||||
},
|
||||
},
|
||||
theme: newCustomTheme,
|
||||
});
|
||||
|
||||
dropdown.on('clear', function (e) {
|
||||
console.log(`this state: ${e}`);
|
||||
});
|
||||
// dropdown.on('clear', function (e) {
|
||||
// console.log(`this state: ${e}`);
|
||||
// });
|
||||
|
||||
// ------------------------------NativeSelect-----------------------
|
||||
const dropdownNativeSelect = new CGSelect({
|
||||
|
9
example/themeTest.ts
Normal file
9
example/themeTest.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { CustomTheme } from 'components/theme/theme.interface';
|
||||
|
||||
export const newCustomTheme: CustomTheme = {
|
||||
name: 'test',
|
||||
styles: {
|
||||
head: 'testClassRed',
|
||||
list: 'testClassRed',
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user