@@ -18,15 +18,15 @@ export const iconSizes = {
1818
1919// -------------------------------------------------- Drawer //
2020export const useDrawerStyles : UseDrawerStyles = ( options ) => {
21- const { isMouseDown, location, maxWidth, minWidth, rail, railWidth, resizedAmount, widthSnapBack } = options ;
21+ const { isMouseDown, location, maxWidth, minWidth, rail, railWidth, resizedAmount, snapBack } = options ;
2222
2323 if ( rail ) {
2424 return { } ;
2525 }
2626
2727 let mountValue = rail ? railWidth : unref ( resizedAmount ) ;
2828
29- if ( ! widthSnapBack ) {
29+ if ( ! snapBack ) {
3030 if ( parseInt ( mountValue as string ) >= parseInt ( maxWidth as string ) ) {
3131 mountValue = parseInt ( maxWidth as string ) ;
3232 }
@@ -40,6 +40,7 @@ export const useDrawerStyles: UseDrawerStyles = (options) => {
4040
4141 if ( location === 'top' || location === 'bottom' ) {
4242 response = {
43+ maxHeight : `${ useConvertToUnit ( { value : mountValue as string } ) as string } !important` ,
4344 minHeight : `${ useConvertToUnit ( { value : mountValue as string } ) as string } !important` ,
4445 transitionDuration : unref ( isMouseDown ) ? '0s' : '.2s' ,
4546 width : '100%' ,
@@ -61,22 +62,18 @@ export const useHandleContainerStyles: UseHandleContainerStyles = (options) => {
6162 const { borderWidth, handleColor, iconSizeUnit, location, position, theme } = options ;
6263
6364 const transform = `translateX(-50%) ${ location === 'top' ? 'rotate(90deg)' : 'rotate(-90deg)' } ` ;
64- let height = '100%' ;
65- let width = '100%' ;
65+ let height = ` ${ iconSizeUnit } px` ;
66+ let width = ` ${ iconSizeUnit } px` ;
6667
67- if ( location === 'bottom' || location === 'top' ) {
68- height = `${ iconSizeUnit } px` ;
69-
70- if ( position === 'border' ) {
68+ if ( position === 'border' ) {
69+ if ( location === 'bottom' || location === 'top' ) {
7170 height = useConvertToUnit ( { value : borderWidth as string } ) as string ;
7271 }
73- }
74- else {
75- width = useConvertToUnit ( { value : borderWidth as string } ) as string ;
76- }
77-
72+ else {
73+ height = '100%' ;
74+ width = useConvertToUnit ( { value : borderWidth as string } ) as string ;
75+ }
7876
79- if ( position === 'border' ) {
8077 return {
8178 backgroundColor : useGetColor ( handleColor as string , theme ) ,
8279 height,
@@ -88,7 +85,7 @@ export const useHandleContainerStyles: UseHandleContainerStyles = (options) => {
8885 backgroundColor : 'transparent' ,
8986 height : height ,
9087 transform : location === 'top' || location === 'bottom' ? transform : undefined ,
91- width : ` ${ iconSizeUnit } px` ,
88+ width,
9289 } ;
9390} ;
9491
0 commit comments