docs: absoluteDims

This commit is contained in:
Cole Lawrence 2022-06-07 11:53:43 -04:00 committed by Aria
parent c74aa1b930
commit 40d2c7fe04

View file

@ -1,3 +1,4 @@
/** Create CSS rule string for centered and give it this width and height */
export const absoluteDims = (w: number, h = w) => `
left: ${w * -0.5}px;
top: ${h * -0.5}px;