Settings menu now warns when a setting is unsaved. (#65)
* Settings menu now warns when a setting is unsaved. Additionally, font-weight increments properly now. * Remove font weight fix - another PR already open for fix.
This commit is contained in:
@@ -8,7 +8,10 @@ type Option = {
|
||||
subtitle: string,
|
||||
|
||||
}
|
||||
|
||||
export const Option = <T>(props: RowProps<T>, className: string = '') => {
|
||||
const isUnsaved = Variable(false);
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "option-item",
|
||||
hexpand: true,
|
||||
@@ -19,7 +22,7 @@ export const Option = <T>(props: RowProps<T>, className: string = '') => {
|
||||
hexpand: true,
|
||||
child: Label(props.title, props.subtitle || ""),
|
||||
}),
|
||||
Inputter(props, className),
|
||||
Inputter(props, className, isUnsaved),
|
||||
Widget.Button({
|
||||
vpack: "center",
|
||||
class_name: "reset-options",
|
||||
|
||||
Reference in New Issue
Block a user