refactor(ags): add css option to some custom widgets
This commit is contained in:
parent
2a64ff2a96
commit
aaea660e45
1 changed files with 3 additions and 3 deletions
|
@ -1,16 +1,16 @@
|
||||||
import { Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
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) {
|
if (vertical) {
|
||||||
return Box({
|
return Box({
|
||||||
css: `min-height: ${size}px;`,
|
css: `min-height: ${size}px; ${css}`,
|
||||||
...props,
|
...props,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Box({
|
return Box({
|
||||||
css: `min-width: ${size}px;`,
|
css: `min-width: ${size}px; ${css}`,
|
||||||
...props,
|
...props,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue