clean code
This commit is contained in:
parent
412b65c864
commit
9113f58106
@ -1,5 +1,4 @@
|
|||||||
import { Group, Panel, List, text, gravity, Color, Stack, LayoutSpec, list, NativeCall, listItem, log, vlayout, Gravity, hlayout, Text } from "doric";
|
import { Group, Panel, List, text, gravity, Color, Stack, LayoutSpec, list, NativeCall, listItem, log, vlayout, Gravity, hlayout, Text } from "doric";
|
||||||
import { O_TRUNC } from "constants";
|
|
||||||
const colors = [
|
const colors = [
|
||||||
"#f0932b",
|
"#f0932b",
|
||||||
"#eb4d4b",
|
"#eb4d4b",
|
||||||
|
@ -13,37 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
// import { View, Stack, VLayout, HLayout } from "../ui/view"
|
|
||||||
|
|
||||||
// export type ViewBlock = () => View
|
|
||||||
|
|
||||||
// export function stack(blocks: ViewBlock[]) {
|
|
||||||
// return takeAlso(new Stack)(
|
|
||||||
// it => {
|
|
||||||
// for (let block of blocks) {
|
|
||||||
// it.addChild(block())
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// export function vlayout(blocks: ViewBlock[]) {
|
|
||||||
// return takeAlso(new VLayout)(
|
|
||||||
// it => {
|
|
||||||
// for (let block of blocks) {
|
|
||||||
// it.addChild(block())
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// export function hlayout(blocks: ViewBlock[]) {
|
|
||||||
// return takeAlso(new HLayout)(
|
|
||||||
// it => {
|
|
||||||
// for (let block of blocks) {
|
|
||||||
// it.addChild(block())
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
export function take<T>(target: T) {
|
export function take<T>(target: T) {
|
||||||
return (block: (p: T) => void) => {
|
return (block: (p: T) => void) => {
|
||||||
block(target)
|
block(target)
|
||||||
|
Reference in New Issue
Block a user