@react-native-paper-abstracted/cli
Version:
React Native Paper Abstracted is a package that allows you to use only the components you need from [React Native Paper](https://reactnativepaper.com). Thus allowing users to keep their app size small, and provides endless customization.
22 lines (20 loc) • 608 B
text/typescript
import ora from "ora";
import { turboBlue, turboRed, turboYellow } from "./index.js";
export function _spinner() {
const loader = ora();
return ({
fetch: (msg = "Fetching content...") => {
loader.start(msg);
loader.spinner = {
frames: [" ", turboBlue("> "), turboYellow(">> "), turboRed(">>>")],
};
},
initialize: (msg = "Initializing...") => {
loader.start(msg);
},
stop: () => loader.stop(),
fail: (msg?: string) => loader.fail(msg),
start: (msg?: string) => loader.start(msg),
succeed: (msg?: string) => loader.succeed(msg),
});
}