import type { SpacingType } from "../types";

export const getSpacingValue = (
  padding: SpacingType | undefined,
): string | undefined => {
  if (typeof padding === "string") {
    return `var(--size-${padding})`;
  }

  if (typeof padding === "number") {
    return `${padding}px`;
  }

  return undefined;
};
