21 lines
516 B
JavaScript
21 lines
516 B
JavaScript
import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
|
|
|
import EventBox from '../misc/cursorbox.js';
|
|
|
|
|
|
export default () => EventBox({
|
|
className: 'toggle-off',
|
|
onPrimaryClickRelease: () => Tablet.toggleMode(),
|
|
|
|
connections: [[Tablet, self => {
|
|
self.toggleClassName('toggle-on', Tablet.tabletMode);
|
|
}, 'mode-toggled']],
|
|
|
|
child: Box({
|
|
className: 'tablet-toggle',
|
|
vertical: false,
|
|
child: Label({
|
|
label: ' ',
|
|
}),
|
|
}),
|
|
});
|