feat: add positionAbsolute in style helper
This commit is contained in:
@@ -117,3 +117,29 @@ export const textEllipsis = (lineNum = 1): CSSProperties => {
|
|||||||
whiteSpace: 'nowrap',
|
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,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user