react-native-unit-components
Version:
Unit React Native components
29 lines (25 loc) • 583 B
text/typescript
export type UNFonts = {
[fontFamily: string]: UNFontData[];
}
export type UNFontData = {
// Using 'field' instead of 'key' to account for potential variants unrelated to font weight.
fontWeight: FontWeight;
sources: UNFontSource[];
}
export type UNFontSource = {
// using the fileName for iOS and relative path for Android
fileName: string;
assetDirRelativePath: string;
format?: string;
}
export enum FontWeight {
Thin = 100,
ExtraLight = 200,
Light = 300,
Regular = 400,
Medium = 500,
SemiBold = 600,
Bold = 700,
ExtraBold = 800,
Black = 900
}