Skip to content

Commit fec3652

Browse files
YolijnRobbert
authored andcommitted
refactor: move datalist elements to the section where they are used
1 parent 7b1cc1b commit fec3652

File tree

1 file changed

+14
-28
lines changed

1 file changed

+14
-28
lines changed

proprietary/basis-design-tokens/documentation/ThemeBuilder.tsx

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -89,35 +89,7 @@ export const ThemeBuilder = () => {
8989
))
9090
: null}
9191
</datalist>
92-
<datalist id="font-family">
93-
{projectWallaceJson?.FontFamily
94-
? Object.values(projectWallaceJson?.FontFamily).map((token, index) => (
95-
<option key={index}>{token['$value']}</option>
96-
))
97-
: null}
98-
</datalist>
99-
<datalist id="font-size">
100-
{projectWallaceJson?.FontSize
101-
? Object.values(projectWallaceJson?.FontSize).map((token, index) => (
102-
<option key={index}>{token['$value']}</option>
103-
))
104-
: null}
105-
</datalist>
106-
<datalist id="line-height">
107-
{projectWallaceJson?.LineHeight
108-
? Object.values(projectWallaceJson?.LineHeight).map((token, index) => (
109-
<option key={index}>{token['$value']}</option>
110-
))
111-
: null}
112-
</datalist>
11392

114-
<datalist id="border-radius">
115-
{projectWallaceJson?.Radius
116-
? Object.values(projectWallaceJson?.Radius).map((token, index) => (
117-
<option key={index}>{token['$value']}</option>
118-
))
119-
: null}
120-
</datalist>
12193
<div>
12294
{[
12395
{
@@ -220,6 +192,13 @@ export const ThemeBuilder = () => {
220192
))}
221193
</div>
222194
<h2 id="fonts">Fonts</h2>
195+
<datalist id="font-family">
196+
{projectWallaceJson?.FontFamily
197+
? Object.values(projectWallaceJson?.FontFamily).map((token, index) => (
198+
<option key={index}>{token['$value']}</option>
199+
))
200+
: null}
201+
</datalist>
223202
<div>
224203
{[
225204
{
@@ -247,6 +226,13 @@ export const ThemeBuilder = () => {
247226
</div>
248227
<h2 id="typography-scale">Typography scale</h2>
249228
<p>Vul een font-size in pixels in.</p>
229+
<datalist id="font-size">
230+
{projectWallaceJson?.FontSize
231+
? Object.values(projectWallaceJson?.FontSize).map((token, index) => (
232+
<option key={index}>{token['$value']}</option>
233+
))
234+
: null}
235+
</datalist>
250236
<div>
251237
{[
252238
{

0 commit comments

Comments
 (0)