Skip to content

Commit

Permalink
Show background opacity control only for non-glass themes
Browse files Browse the repository at this point in the history
  • Loading branch information
raimannma committed Feb 12, 2025
1 parent fd9eceb commit 9319112
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions app/components/widget-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,23 +305,25 @@ export default function WidgetBuilder({ region, accountId }: WidgetBuilderProps)
</div>

<div className="space-y-6">
<div>
<label htmlFor="opacity" className="block text-sm font-medium text-gray-700">
Background Opacity
</label>
<div className="mt-1 flex items-center gap-2">
<input
type="range"
id="opacity"
min="0"
max="100"
value={opacity}
onChange={(e) => setOpacity(Number(e.target.value))}
className="w-full h-2 rounded-lg appearance-none cursor-pointer bg-gray-200"
/>
<span className="text-sm text-gray-600 min-w-[3ch]">{opacity}%</span>
{theme !== "glass" && (
<div>
<label htmlFor="opacity" className="block text-sm font-medium text-gray-700">
Background Opacity
</label>
<div className="mt-1 flex items-center gap-2">
<input
type="range"
id="opacity"
min="0"
max="100"
value={opacity}
onChange={(e) => setOpacity(Number(e.target.value))}
className="w-full h-2 rounded-lg appearance-none cursor-pointer bg-gray-200"
/>
<span className="text-sm text-gray-600 min-w-[3ch]">{opacity}%</span>
</div>
</div>
</div>
)}

<div className="space-y-2">
<h3 className="text-sm font-medium text-gray-700">Preview</h3>
Expand Down

0 comments on commit 9319112

Please sign in to comment.