diff --git a/packages/app/src/styles/helper.ts b/packages/app/src/styles/helper.ts index da70c3cd4b..3e5949ae3e 100644 --- a/packages/app/src/styles/helper.ts +++ b/packages/app/src/styles/helper.ts @@ -117,3 +117,29 @@ export const textEllipsis = (lineNum = 1): CSSProperties => { whiteSpace: 'nowrap', }; }; + +export const positionAbsolute = ({ + left, + top, + right, + bottom, +}: { + left?: CSSProperties['left']; + top?: CSSProperties['top']; + right?: CSSProperties['right']; + bottom?: CSSProperties['bottom']; +}): { + position: CSSProperties['position']; + left: CSSProperties['left']; + top: CSSProperties['top']; + right: CSSProperties['right']; + bottom: CSSProperties['bottom']; +} => { + return { + position: 'absolute', + left, + top, + right, + bottom, + }; +};