1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
import * as sfw from 'sfw';
const { I } = sfw.element.native;
import Settings from './settings';
import Shuffle from './shuffle';
import Calendar from './calendar';
import Search from './search';
import Close from './close';
import Home from './home';
import Add from './add';
import Edit from './edit';
import Check from './check';
import Next from './next';
const icons = {
'settings': Settings,
'shuffle': Shuffle,
'calendar': Calendar,
'search': Search,
'close': Close,
'home': Home,
'add': Add,
'edit': Edit,
'check': Check,
'next': Next,
};
const target = { icons: icons };
const handler = {
get(target, prop, receiver) {
return I.new({
innerHTML: target.icons[prop] ?? '?',
className: 'icon',
});
}
};
export default new Proxy(target, handler);
|