Files
discord-decomp/modules/messages/native/renderer/rows/Loading.tsx
T
2026-11-01 12:12:55 +02:00

28 lines
1.1 KiB
TypeScript

// Metro module 12394 (f12395).
import { LoadingType, RowType, SeparatorAction } from "../RowGeneratorConstants";
import { createNativeStyleProperties } from "../../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../../_bundle/Module712";
const nativeStyleProperties = createNativeStyleProperties({
loadButtonBackgroundColor: Module712.colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT,
loadButtonColor: Module712.colors.CONTROL_SECONDARY_TEXT_DEFAULT,
loadingColor: Module712.colors.ICON_SUBTLE
});
export function generateLoadingRowData({ rowType, changeType, text, isLoading }, a1) {
const r10 = nativeStyleProperties(a1);
return {
type: RowType.LOADING,
id: rowType,
button: {
action: {
type: rowType === LoadingType.LOAD_BEFORE ? SeparatorAction.LOAD_MORE_BEFORE : SeparatorAction.LOAD_MORE_AFTER
},
backgroundColor: r10.loadButtonBackgroundColor,
cornerRadius: 4,
text
},
color: isLoading ? r10.loadingColor : r10.loadButtonColor,
changeType,
isLoading
};
}