Skip to content

Commit

Permalink
simplify slider and label positioning logic
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed Aug 6, 2022
1 parent 1c9b250 commit 6e4ccc1
Show file tree
Hide file tree
Showing 3 changed files with 274 additions and 520 deletions.
4 changes: 4 additions & 0 deletions src/augments/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ export function mapRange(
export function clamp(number: number, lower: number, upper: number) {
return Math.min(Math.max(number, lower), upper);
}

export function toPixel(value: number): string {
return `${value}px`;
}
Loading

0 comments on commit 6e4ccc1

Please sign in to comment.