expo-ui-kit
expo-ui-kit copied to clipboard
Access theme constants in your own source code.
All that needs to be done is adding the following to index.d.ts in expo-ui-kit/src:
...
export declare const theme: {
COLORS: {
font: string;
primary: string;
secondary: string;
tertiary: string;
black: string;
white: string;
gray: string;
error: string;
warning: string;
success: string;
info: string;
},
SIZES: {
base: number;
font: number;
radius: number;
padding: number;
h1: number;
h2: number;
h3: number;
title: number;
subtitle: number;
caption: number;
small: number;
width: number;
height: number;
},
FONTS: {
h1: {
fontSize: number;
letterSpacing: number;
};
h2: {
fontSize: number;
letterSpacing: number;
};
h3: {
fontSize: number;
letterSpacing: number;
};
title: {
fontSize: number;
letterSpacing: number;
};
subtitle: {
fontSize: number;
};
caption: {
fontSize: number;
letterSpacing: number;
};
small: {
fontSize: number;
letterSpacing: number;
};
},
WEIGHTS: {
regular: string;
bold: string;
semibold: string;
medium: string;
light: string;
}
}
...
Thank you for your feedback! I was thinking to rewrite expo-ui-kit using TS & publish it compiled :)