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';
|
||||
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue