forked from revery-ui/revery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Border.re
41 lines (37 loc) · 849 Bytes
/
Border.re
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
open Revery;
open Revery.UI;
let defaultStyle =
Style.[
backgroundColor(Colors.white),
position(`Relative),
left(100),
top(100),
width(200),
height(200),
border(~width=15, ~color=Colors.red),
borderHorizontal(~width=8, ~color=Colors.blue),
borderTop(~width=15, ~color=Colors.red),
borderLeft(~width=30, ~color=Colors.green),
borderRadius(16.0),
];
let innerStyle =
Style.[
backgroundColor(Colors.yellow),
position(`Relative),
left(0),
top(0),
width(30),
height(30),
borderHorizontal(~color=Colors.black, ~width=3),
];
let textStyle =
Style.[
fontSize(20),
fontFamily("Roboto-Regular.ttf"),
color(Colors.black),
];
let render = () =>
<View style=defaultStyle>
<View style=innerStyle />
<Text style=textStyle text="Inner Text" />
</View>;