Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
@@ -1,33 +1,34 @@
|
||||
export const Label = (name: string, sub = "", subtitleLink = '') => {
|
||||
const subTitle = () => {
|
||||
import { GBox, GButton, GLabel } from 'lib/types/widget';
|
||||
|
||||
export const Label = (name: string, sub = '', subtitleLink = ''): GBox => {
|
||||
const subTitle = (): GButton | GLabel => {
|
||||
if (subtitleLink.length) {
|
||||
return Widget.Button({
|
||||
hpack: "start",
|
||||
vpack: "center",
|
||||
class_name: "options-sublabel-link",
|
||||
hpack: 'start',
|
||||
vpack: 'center',
|
||||
class_name: 'options-sublabel-link',
|
||||
label: sub,
|
||||
// run a bash command to open the link in the default browswer
|
||||
on_primary_click: () => Utils.execAsync(`bash -c 'xdg-open ${subtitleLink}'`),
|
||||
})
|
||||
});
|
||||
}
|
||||
return Widget.Label({
|
||||
hpack: "start",
|
||||
vpack: "center",
|
||||
class_name: "options-sublabel",
|
||||
label: sub
|
||||
})
|
||||
}
|
||||
hpack: 'start',
|
||||
vpack: 'center',
|
||||
class_name: 'options-sublabel',
|
||||
label: sub,
|
||||
});
|
||||
};
|
||||
return Widget.Box({
|
||||
vertical: true,
|
||||
hpack: "start",
|
||||
hpack: 'start',
|
||||
children: [
|
||||
Widget.Label({
|
||||
hpack: "start",
|
||||
vpack: "center",
|
||||
class_name: "options-label",
|
||||
label: name
|
||||
hpack: 'start',
|
||||
vpack: 'center',
|
||||
class_name: 'options-label',
|
||||
label: name,
|
||||
}),
|
||||
subTitle()
|
||||
]
|
||||
})
|
||||
}
|
||||
subTitle(),
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user