File tree 3 files changed +17
-12
lines changed
3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const ThemeGenerator = () => {
51
51
return (
52
52
< div className = "container mx-auto p-4" >
53
53
< h1 className = "text-2xl font-bold mb-4" > VS Code Theme Generator</ h1 >
54
- < div className = "flex gap-10" >
54
+ < div className = "flex flex-wrap lg:flex-nowrap gap-10" >
55
55
< div className = "flex flex-col gap-4 w-full lg:w-7/12" >
56
56
< div className = "flex gap-10 items-end" >
57
57
< ThemeControls />
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ const ThemeControls: React.FC = () => {
181
181
< Button
182
182
className = "w-full text-xs"
183
183
size = "sm"
184
- onClick = { ( ) => handleRandomize ( true ) }
184
+ onClick = { ( ) => handleRandomize ( false ) }
185
185
>
186
186
Randomize Full
187
187
</ Button >
@@ -200,7 +200,7 @@ const ThemeControls: React.FC = () => {
200
200
< Button
201
201
className = "w-full text-xs"
202
202
size = "sm"
203
- onClick = { ( ) => handleRandomize ( false ) }
203
+ onClick = { ( ) => handleRandomize ( true ) }
204
204
>
205
205
Randomize with Few Colors
206
206
</ Button >
Original file line number Diff line number Diff line change @@ -201,16 +201,21 @@ export function generateThemeColors(
201
201
const ac1Hue = Color ( colors . AC1 ) . hue ( )
202
202
const ac2Hue = Color ( colors . AC2 ) . hue ( )
203
203
204
- const ac1AdditionalHues = generateSchemeColors ( ac1Hue , scheme )
205
- const ac2AdditionalHues = generateSchemeColors ( ac2Hue , scheme )
206
- console . log ( 'AC1 additional hues: ' , ac1AdditionalHues )
207
- console . log ( 'AC2 additional hues: ' , ac2AdditionalHues )
204
+ let updatedSchemeHues = [ ...schemeHues ]
205
+
206
+ if ( ! few ) {
207
+ const ac1AdditionalHues = generateSchemeColors ( ac1Hue , scheme )
208
+ const ac2AdditionalHues = generateSchemeColors ( ac2Hue , scheme )
209
+ console . log ( 'AC1 additional hues: ' , ac1AdditionalHues )
210
+ console . log ( 'AC2 additional hues: ' , ac2AdditionalHues )
211
+
212
+ updatedSchemeHues = [
213
+ ...schemeHues ,
214
+ ...ac1AdditionalHues ,
215
+ ...ac2AdditionalHues ,
216
+ ]
217
+ }
208
218
209
- const updatedSchemeHues = [
210
- ...schemeHues ,
211
- ...ac1AdditionalHues ,
212
- ...ac2AdditionalHues ,
213
- ]
214
219
console . log ( 'ALL SCHEME HUES: ' , updatedSchemeHues )
215
220
216
221
return { colors, schemeHues : updatedSchemeHues , scheme }
You can’t perform that action at this time.
0 commit comments