parent
3a5c29fe0d
commit
4c91f0f4f7
@ -0,0 +1,21 @@ |
||||
import type { CSSProperties } from 'vue' |
||||
import type { ClipBehavior } from '../types' |
||||
|
||||
export function clip(clip: ClipBehavior | undefined): CSSProperties | undefined { |
||||
switch (clip) { |
||||
case 'autoX': |
||||
return { |
||||
overflowX: 'auto', |
||||
overflowY: 'hidden', |
||||
} |
||||
case 'autoY': |
||||
return { |
||||
overflowX: 'hidden', |
||||
overflowY: 'auto', |
||||
} |
||||
default: |
||||
return { |
||||
overflow: clip, |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue