-
Notifications
You must be signed in to change notification settings - Fork 219
Expand file tree
/
Copy pathmodels.ts
More file actions
23 lines (15 loc) · 783 Bytes
/
models.ts
File metadata and controls
23 lines (15 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export type SplitAreaSize = number | '*'
export type SplitAreaSizeInput = SplitAreaSize | `${number}` | undefined | null
const internalAreaSizeTransform = (areaSize: SplitAreaSizeInput): SplitAreaSize =>
areaSize === undefined || areaSize === null || areaSize === '*' ? '*' : +areaSize
export const areaSizeTransform = (areaSize: SplitAreaSizeInput): SplitAreaSize | 'auto' =>
internalAreaSizeTransform(areaSize)
export const boundaryAreaSizeTransform = (areaSize: SplitAreaSizeInput): SplitAreaSize =>
internalAreaSizeTransform(areaSize)
export type SplitDirection = 'horizontal' | 'vertical'
export type SplitDir = 'ltr' | 'rtl'
export type SplitUnit = 'pixel' | 'percent'
export interface SplitGutterInteractionEvent {
gutterNum: number
sizes: SplitAreaSize[]
}