-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample-node.tsx
More file actions
51 lines (48 loc) · 1.11 KB
/
Example-node.tsx
File metadata and controls
51 lines (48 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env node
import React from 'react';
import { AppRegistry, View, Text } from './build';
const InkBoilerplate = ({ name = 'Someone' }) => {
return (
<View>
<Text
style={{
backgroundColor: 'blue',
padding: 2,
paddingRight: 1,
margin: 1,
marginTop: 3,
marginLeft: 2,
color: 'orange',
textAlign: 'right',
fontStyle: 'oblique',
borderRightColor: 'cyan',
borderTopColor: 'yellow',
textDecorationStyle: 'underline',
borderColor: 'purple',
}}
>
Hello, {name}. <Text>BRO</Text>
</Text>
<Text style={{ color: 'white' }}>
Test Basic{' '}
<Text style={{ color: 'orange', textDecorationStyle: 'underline' }}>
nested text
</Text>
</Text>
</View>
);
};
// @ts-ignore
AppRegistry.registerComponent('main', () => InkBoilerplate);
AppRegistry.runApplication(
'main',
`
Usage
$ inkboilerplate
Options
--name Your name
Examples
$ inkboilerplate --name=John
Hello, John. From Ink Boilerplate
`,
);