Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
// Module ID: 8349
|
|
// Function ID: 8350
|
|
// Dependencies: [1074, 4347, 2]
|
|
// Exports: getIllustrationSource, useIllustrationSource
|
|
|
|
// Module 8349
|
|
import Constants from "Constants" /* 1074 */;
|
|
import native from "native" /* 4347 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const ThemeTypes = Constants.ThemeTypes;
|
|
const result = size.fileFinishedImporting("design/components/Illustration/native/index.tsx");
|
|
|
|
export const getIllustrationSource = function getIllustrationSource(theme, light) {
|
|
if (theme === ThemeTypes.LIGHT) {
|
|
light = light.light;
|
|
} else if (theme === tmp.DARK) {
|
|
let midnight = light.darker;
|
|
if (midnight == null) {
|
|
midnight = light.midnight;
|
|
}
|
|
light = midnight;
|
|
} else if (theme === tmp.ONYX) {
|
|
let darker = light.midnight;
|
|
if (darker == null) {
|
|
darker = light.darker;
|
|
}
|
|
light = darker;
|
|
}
|
|
if (null != light) {
|
|
let lightResult = light();
|
|
} else {
|
|
lightResult = light.dark();
|
|
}
|
|
return lightResult;
|
|
};
|
|
export const useIllustrationSource = function useIllustrationSource(fn) {
|
|
return fn(native.useThemeContext().theme);
|
|
};
|