@@ -6,7 +6,7 @@ import { getColorTheme, subscribeColorTheme } from "./utils/bolt-utils";
6
6
import CodeSnippet from "./components/snippet/CodeSnippet" ;
7
7
import { ExportType , useInspectorStore } from "./utils/store" ;
8
8
import DialogFrame from "./components/DialogFrame.js" ;
9
- import { Button , Checkbox , DropdownMenu , Text } from "figma-kit" ;
9
+ import { Text , Button , Checkbox , DropdownMenu } from "figma-kit" ;
10
10
import "./main.css" ;
11
11
12
12
export const App = ( ) => {
@@ -102,40 +102,63 @@ export const App = () => {
102
102
/>
103
103
</ DialogFrame . Content >
104
104
< DialogFrame . Footer >
105
- < div className = "border border-secondary border-[var(--figma-color-bg-brand)]" >
106
- < Text className = "text-[var(--figma-color-bg-brand)]" >
107
- Welcome to Figma
108
- </ Text >
109
- </ div >
105
+ < Checkbox . Root >
106
+ < Checkbox . Input
107
+ checked = { useVariables }
108
+ onChange = { ( e ) => setUseVariables ( e . target . checked ) }
109
+ />
110
+ < Checkbox . Label > Use Figma Variables</ Checkbox . Label >
111
+ </ Checkbox . Root >
112
+
110
113
< DropdownMenu . Root >
111
114
< DropdownMenu . Trigger asChild >
112
- < Button > Export</ Button >
115
+ < Button
116
+ variant = {
117
+ exportsAreCurrent ? "secondary" : "primary"
118
+ }
119
+ style = { {
120
+ visibility : useVariables
121
+ ? "visible"
122
+ : "hidden" ,
123
+ } }
124
+ >
125
+ Export
126
+ </ Button >
113
127
</ DropdownMenu . Trigger >
114
- < DropdownMenu . Content style = { { } } >
128
+ < DropdownMenu . Content >
115
129
< DropdownMenu . Item
116
130
onClick = { ( ) =>
117
131
exportFiles ( ExportType . SeparateFiles )
118
132
}
119
133
>
120
- Separate Files…
134
+ Separate Files Per Collection …
121
135
</ DropdownMenu . Item >
122
136
< DropdownMenu . Item
123
137
onClick = { ( ) =>
124
138
exportFiles ( ExportType . SingleFile )
125
139
}
126
140
>
127
- Single File…
141
+ Singl Design-Tokens File…
128
142
</ DropdownMenu . Item >
129
143
</ DropdownMenu . Content >
130
144
</ DropdownMenu . Root >
131
-
132
- < Checkbox . Root >
133
- < Checkbox . Input
134
- checked = { useVariables }
135
- onChange = { ( e ) => setUseVariables ( e . target . checked ) }
136
- />
137
- < Checkbox . Label > Use Figma Variables</ Checkbox . Label >
138
- </ Checkbox . Root >
145
+ < Text
146
+ style = { {
147
+ color : exportsAreCurrent
148
+ ? "var(--figma-color-text-disabled)"
149
+ : "var(--figma-color-text-primary" ,
150
+ } }
151
+ >
152
+ { useVariables ? (
153
+ exportsAreCurrent ? (
154
+ < em > Exports are current</ em >
155
+ ) : (
156
+ "Either variables have changed or no export found"
157
+ )
158
+ ) : (
159
+ ""
160
+ ) }
161
+ </ Text >
139
162
</ DialogFrame . Footer >
140
163
</ DialogFrame >
141
164
</ >
0 commit comments