Skip to content

Instantly share code, notes, and snippets.

View tbuschto's full-sized avatar
🤨

Tim Buschtöns tbuschto

🤨
View GitHub Profile
import {TextView, CollectionView, Slider, ui, Composite} from 'tabris';
const items = [
'One', 'Two', 'Three', 'Four', 'Five', 'Six',
'Seven', 'Eight', 'Nine', 'Ten', 'Foo', 'Bar', 'Hello World'
]
const MARGIN = 10;
const BORDER = 2;
const TILE_HEIGHT = 128;
@tbuschto
tbuschto / chinese-hello-world.js
Created November 21, 2018 17:41
Chinese Hello World
import {TextView, ui} from 'tabris';
new TextView({
left: 10, top: 10, right: 10, font: '23px',
text: '你好,世界',
alignment: 'left'
}).appendTo(ui.contentView);
@tbuschto
tbuschto / tabris-2-decorators-blog-4-1.tsx
Last active December 21, 2018 15:16
tabris-2-decorators-blog-4-1.tsx
import { Composite, ui, AlertDialog } from 'tabris';
import { bind, component, property, ComponentJSX, event, ChangeListeners, Listeners } from 'tabris-decorators';
// ------------ Component ------------
@component
export default class LabeledInput extends Composite {
@bind('#input.text') public text: string;
@event public readonly onTextChanged: ChangeListeners<string>;
@tbuschto
tbuschto / tabris-func.js
Last active October 1, 2020 15:37
Self-running snippets for functional tabris components
// eslint-disable-next-line max-len
const {TextView, contentView, NavigationView, Page, drawer, StackLayout, Stack, Row, CollectionView, Button, ImageView, TabFolder, CheckBox, Tab, Composite, TextInput, AlertDialog} = require('tabris');
const examples = MainView().appendTo(contentView);
// This is a standalone, plain JS Tabris app that showcases different use cases
// for functional components. Each self-running function below contains a small
// snippet with explanatory comments. You can see them in action by selecting
// it from the drawer while running the app.
//