This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-demo/src/SimpleDemo.ts

28 lines
774 B
TypeScript
Raw Normal View History

2021-03-01 18:59:09 +08:00
import { Group, Panel, text, gravity, Color, LayoutSpec, vlayout, hlayout, scroller, layoutConfig, stack, Gravity } from "doric";
@Entry
class LayoutDemo extends Panel {
build(rootView: Group) {
2021-03-01 20:22:32 +08:00
hlayout([
2021-03-01 18:59:09 +08:00
stack([], {
width: 100,
height: 100,
backgroundColor: Color.RED
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.GREEN
}),
stack([], {
width: 100,
height: 100,
backgroundColor: Color.BLUE
})
], {
width: 300,
height: 300,
backgroundColor: Color.BLACK
}).in(rootView)
}
}