Skip to content

Commit

Permalink
feature: replace the slider with an input
Browse files Browse the repository at this point in the history
  • Loading branch information
cdxker authored and skeptrunedev committed Dec 21, 2024
1 parent 09ef286 commit bf9dec7
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions frontends/dashboard/src/pages/dataset/PublicPageSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -709,22 +709,20 @@ const PublicPageControls = () => {
</div>
<div class="">
<label class="block" for="">
Foreground Opacity
Foreground Opacity 0-1
</label>
<input
type="range"
min="0"
max="100"
onChange={(e) => {
type="number"
placeholder="1000"
value={extraParams.heroPattern?.foregroundOpacity || 0.5}
onInput={(e) => {
setExtraParams(
"heroPattern",
"foregroundOpacity",
parseInt(e.currentTarget.value) / 100,
parseFloat(e.currentTarget.value),
);
}}
value={
(extraParams.heroPattern?.foregroundOpacity || 0.5) * 100
}
class="block w-full rounded border border-neutral-300 px-3 py-1.5 shadow-sm placeholder:text-neutral-400 focus:outline-magenta-500 sm:text-sm sm:leading-6"
/>
</div>
</div>
Expand Down

0 comments on commit bf9dec7

Please sign in to comment.