We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94bc2ba commit 1d308a9Copy full SHA for 1d308a9
src/showcase/effects/gradients/CustomGradientGenerator.tsx
@@ -92,7 +92,12 @@ const CustomGradientGenerator = () => {
92
setFromColor(newFromColor)
93
setToColor(newToColor)
94
setSelected(newDirection)
95
- setShowVia(false) // Optionally, you can set this to Math.random() > 0.5 to randomly include or exclude the via color
+ const newShowVia = Math.random() > 0.5
96
+ setShowVia(newShowVia)
97
+ if (newShowVia) {
98
+ const newViaColor = getRandomColor()
99
+ setViaColor(newViaColor)
100
+ }
101
}
102
103
const variants = {
0 commit comments