1 | working on it
|
2 |
|
3 | ### Input
|
4 |
|
5 | ```less
|
6 | rn-config {
|
7 | arguments: CommonStyles, ThatStyles;
|
8 | }
|
9 |
|
10 | Navbar {
|
11 | .container1 {
|
12 | flex-direction: "CommonStyles.a.b";
|
13 | align-items: ThatStyles.a.c;
|
14 | .container2 {
|
15 | width: 80;
|
16 | padding-top: 7;
|
17 | padding-bottom: 10;
|
18 | .container3 {
|
19 | width: 80;
|
20 | padding: 7 0 10 0;
|
21 | }
|
22 | }
|
23 | }
|
24 | .triangle {
|
25 | border-top-width: 5;
|
26 | border-left-width: 5;
|
27 | border-right-width: 5;
|
28 | border-top-color: orange;
|
29 | border-left-color: transparent;
|
30 | border-right-color: transparent;
|
31 | background-color: transparent;
|
32 | }
|
33 | }
|
34 |
|
35 | .b {
|
36 | border: none;
|
37 | .c {
|
38 | color: red;
|
39 | }
|
40 | }
|
41 | ```
|
42 |
|
43 | ### Output
|
44 | ```javascript
|
45 | const { StyleSheet } = require('react-native');
|
46 | module.exports= function(CommonStyles, ThatStyles){
|
47 | return {
|
48 | "default": {
|
49 | "b": [
|
50 | {
|
51 | "style": StyleSheet.create({
|
52 | "border": "none"
|
53 | })
|
54 | }
|
55 | ],
|
56 | "c": [
|
57 | {
|
58 | "selectors": [
|
59 | "b"
|
60 | ],
|
61 | "style": StyleSheet.create({
|
62 | "color": "red"
|
63 | })
|
64 | }
|
65 | ]
|
66 | },
|
67 | "Navbar": {
|
68 | "container1": [
|
69 | {
|
70 | "style": StyleSheet.create({
|
71 | "flexDirection": CommonStyles.a.b,
|
72 | "alignItems": ThatStyles.a.c
|
73 | })
|
74 | }
|
75 | ],
|
76 | "container2": [
|
77 | {
|
78 | "selectors": [
|
79 | "container1"
|
80 | ],
|
81 | "style": StyleSheet.create({
|
82 | "width": 80,
|
83 | "paddingTop": 7,
|
84 | "paddingBottom": 10
|
85 | })
|
86 | }
|
87 | ],
|
88 | "container3": [
|
89 | {
|
90 | "selectors": [
|
91 | "container2",
|
92 | "container1"
|
93 | ],
|
94 | "style": StyleSheet.create({
|
95 | "width": 80,
|
96 | "paddingTop": 7,
|
97 | "paddingRight": 0,
|
98 | "paddingBottom": 10,
|
99 | "paddingLeft": 0
|
100 | })
|
101 | }
|
102 | ],
|
103 | "triangle": [
|
104 | {
|
105 | "style": StyleSheet.create({
|
106 | "borderTopWidth": 5,
|
107 | "borderLeftWidth": 5,
|
108 | "borderRightWidth": 5,
|
109 | "borderTopColor": "orange",
|
110 | "borderLeftColor": "transparent",
|
111 | "borderRightColor": "transparent",
|
112 | "backgroundColor": "transparent"
|
113 | })
|
114 | }
|
115 | ]
|
116 | }
|
117 | }
|
118 | }
|
119 | ``` |
\ | No newline at end of file |