mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 11:36:25 +08:00
feat: add positionAbsolute in style helper
This commit is contained in:
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user