import { FontStyleToken, ThemeFontStylesType } from "../../Font/types"; import { Platforms } from "../../types"; import { fontStylesTokens } from "../constants"; import commonGetter from "./commonGetter"; const getFontWeightValue = ( { weight }: Partial, platform: Platforms ) => { switch (platform) { case "web": return weight; case "reactNative": return `${weight}`; default: return weight; } }; export default (platform: T) => commonGetter({ platform, tokens: fontStylesTokens[platform], getValue: getFontWeightValue, }) as ThemeFontStylesType["FontWeights"][T];