add: new list layout design
New design, custom uuid, better handling of swipe
This commit is contained in:
parent
628659c39d
commit
11bcdce6cb
7 changed files with 21 additions and 36 deletions
|
@ -1,3 +1,5 @@
|
|||
export const replaceComma = (value: string | number) => `${value}`.replace(',', '.')
|
||||
|
||||
export const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max)
|
||||
export const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max)
|
||||
|
||||
export const between = (value: number, min: number, max: number) => value >= min && value <= max
|
7
app/utils/uuid.ts
Normal file
7
app/utils/uuid.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
export const randomUUID = (): string => {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
||||
const r = Math.random() * 16 | 0;
|
||||
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue