cal.pub0.org/packages/features/embed/lib/getDimension.tsx

7 lines
147 B
TypeScript

export const getDimension = (dimension: string) => {
if (dimension.match(/^\d+$/)) {
dimension = `${dimension}%`;
}
return dimension;
};