@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
70 lines • 2.66 kB
TypeScript
/**
* Copyright (c) Paymium.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root of this projects source tree.
*/
import { type TextProps } from '../typography';
import { CrossedMethods } from '@crossed/styled';
import { type ReactNode } from 'react';
import { YBoxProps } from '../layout';
declare const progressBarBackground: {
success: CrossedMethods<{
base: {
backgroundColor: "#3ABB7D";
};
}>;
error: CrossedMethods<{
base: {
backgroundColor: "#EF4444";
};
}>;
info: CrossedMethods<{
base: {
backgroundColor: "#93C5FD";
};
}>;
warning: CrossedMethods<{
base: {
backgroundColor: "#F97316";
};
}>;
};
type ContainerProps = YBoxProps & {
closable?: boolean;
icon?: ReactNode;
status?: keyof typeof progressBarBackground;
duration?: number;
};
export type ToastPresetProps = YBoxProps & {
status?: keyof typeof progressBarBackground;
title?: string;
description?: string;
onClose?: () => void;
onDurationEnd?: () => void;
duration?: number;
};
type ProgressProps = {
duration: number;
onDurationEnd?: () => void;
};
declare const Toast: (({ status, children, ...props }: ContainerProps) => import("react/jsx-runtime").JSX.Element) & {
Icon: ({ style, }: {
/**
* Style of container Box
*/
style?: CrossedMethods<any>;
}) => import("react/jsx-runtime").JSX.Element;
Title: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
Description: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
Preset: ({ status, title, description, onClose, duration, onDurationEnd, ...props }: ToastPresetProps) => import("react/jsx-runtime").JSX.Element;
Progress: ({ duration, onDurationEnd }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
};
declare const ToastIcon: ({ style, }: {
/**
* Style of container Box
*/
style?: CrossedMethods<any>;
}) => import("react/jsx-runtime").JSX.Element, ToastTitle: (props: TextProps) => import("react/jsx-runtime").JSX.Element, ToastDescription: (props: TextProps) => import("react/jsx-runtime").JSX.Element, ToastProgress: ({ duration, onDurationEnd }: ProgressProps) => import("react/jsx-runtime").JSX.Element, ToastPreset: ({ status, title, description, onClose, duration, onDurationEnd, ...props }: ToastPresetProps) => import("react/jsx-runtime").JSX.Element;
export { Toast, ToastIcon, ToastTitle, ToastDescription, ToastProgress, ToastPreset, };
//# sourceMappingURL=Toast.d.ts.map