notif clear button hide when empty

This commit is contained in:
end-4
2024-03-25 18:06:45 +07:00
parent 783f9ae518
commit 75e03d609b
2 changed files with 26 additions and 7 deletions
@@ -4,7 +4,7 @@ import { MaterialIcon } from './materialicon.js';
import { setupCursorHover } from '../.widgetutils/cursorhover.js';
const { Box, Button, Label, Revealer } = Widget;
export const ConfigToggle = ({ icon, name, desc = '', initValue, onChange, ...rest }) => {
export const ConfigToggle = ({ icon, name, desc = '', initValue, onChange, expandWidget = true, ...rest }) => {
let value = initValue;
const toggleIcon = Label({
className: `icon-material txt-bold ${value ? '' : 'txt-poof'}`,
@@ -32,7 +32,7 @@ export const ConfigToggle = ({ icon, name, desc = '', initValue, onChange, ...re
className: 'txt txt-small',
label: name,
}),
Box({ hexpand: true }),
expandWidget ? Box({ hexpand: true }) : null,
toggleButton,
]
});