refactor(ags): add css option to some custom widgets

This commit is contained in:
matt1432 2023-11-19 19:16:18 -05:00
parent 2a64ff2a96
commit aaea660e45

View file

@ -1,16 +1,16 @@
import { Box } from 'resource:///com/github/Aylur/ags/widget.js';
export default (size, { vertical = false, ...props } = {}) => {
export default (size, { vertical = false, css = '', ...props } = {}) => {
if (vertical) {
return Box({
css: `min-height: ${size}px;`,
css: `min-height: ${size}px; ${css}`,
...props,
});
}
else {
return Box({
css: `min-width: ${size}px;`,
css: `min-width: ${size}px; ${css}`,
...props,
});
}