Files
ox_lib/package/client/resource/interface/textui.ts

20 lines
743 B
TypeScript
Raw Normal View History

2023-11-15 15:32:04 +01:00
import { IconName, IconPrefix } from '@fortawesome/fontawesome-common-types';
2022-09-14 13:50:32 +02:00
import { CSSProperties } from 'react';
type IconAnimation = 'spin' | 'spinPulse' | 'spinReverse' | 'pulse' | 'beat' | 'fade' | 'beatFade' | 'bounce' | 'shake';
2022-09-14 13:50:32 +02:00
interface OptionsProps {
position?: 'right-center' | 'left-center' | 'top-center';
icon?: IconName | [IconPrefix, IconName];
iconColor?: string;
iconAnimation?: IconAnimation;
2022-09-14 13:50:32 +02:00
style?: CSSProperties;
alignIcon?: 'top' | 'center';
2022-09-14 13:50:32 +02:00
}
2022-09-14 13:50:32 +02:00
export const showTextUI = (text: string, options?: OptionsProps): void => exports.ox_lib.showTextUI(text, options);
export const hideTextUI = (): void => exports.ox_lib.hideTextUI();
export const isTextUIOpen = (): boolean => exports.ox_lib.isTextUIOpen();