Skip to content

Commit

Permalink
ShaderGradientUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ruucm committed Dec 23, 2024
1 parent 703f504 commit ed9852a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/shadergradient-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"globby": "^14.0.2",
"query-string": "^7.1.1",
"react": "^18.3.1",
"react-slider": "^2.0.4",
"socket.io": "^4.7.5",
"socket.io-client": "^4.7.5",
"tailwindcss": "^3.4.10",
Expand Down
13 changes: 13 additions & 0 deletions packages/shadergradient-v2/src/ShaderGradientUI/Slider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import ReactSlider from 'react-slider'

export function Slider(): JSX.Element {
return (
<ReactSlider
className='bg-red-500 h-slider w-full h-full'
markClassName='w-mark h-mark bg-primary top-1/2 transform -translate-y-1/2 slider-mark-center-x'
thumbClassName='bg-primary w-thumb h-thumb rounded-full top-1/2 transform -translate-y-1/2 outline-none cursor-pointer'
thumbActiveClassName='bg-opacity-80'
renderThumb={(props, state) => <div {...props}>{state.valueNow}</div>}
/>
)
}
1 change: 1 addition & 0 deletions packages/shadergradient-v2/src/ShaderGradientUI/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Slider'
10 changes: 6 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed9852a

Please sign in to comment.