Skip to content

Commit

Permalink
Merge pull request #2618 from gluestack/release/@gluestack-ui/themed@…
Browse files Browse the repository at this point in the history
…1.1.63

fix: toast component export
  • Loading branch information
Viraj-10 authored Dec 3, 2024
2 parents 6e17ed1 + afe965c commit 566c7e1
Showing 1 changed file with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,25 +147,24 @@ type IToastProps = React.ComponentProps<typeof Root> & {
className?: string;
} & VariantProps<typeof toastStyle>;

export const Toast = React.forwardRef<
React.ElementRef<typeof Root>,
IToastProps
>(({ className, variant = 'solid', action = 'muted', ...props }, ref) => {
return (
<Root
ref={ref}
className={toastStyle({ variant, action, class: className })}
context={{ variant, action }}
{...props}
/>
);
});
const Toast = React.forwardRef<React.ElementRef<typeof Root>, IToastProps>(
({ className, variant = 'solid', action = 'muted', ...props }, ref) => {
return (
<Root
ref={ref}
className={toastStyle({ variant, action, class: className })}
context={{ variant, action }}
{...props}
/>
);
}
);

type IToastTitleProps = React.ComponentProps<typeof Text> & {
className?: string;
} & VariantProps<typeof toastTitleStyle>;

export const ToastTitle = React.forwardRef<
const ToastTitle = React.forwardRef<
React.ElementRef<typeof Text>,
IToastTitleProps
>(({ className, size = 'md', children, ...props }, ref) => {
Expand Down Expand Up @@ -202,7 +201,7 @@ type IToastDescriptionProps = React.ComponentProps<typeof Text> & {
className?: string;
} & VariantProps<typeof toastDescriptionStyle>;

export const ToastDescription = React.forwardRef<
const ToastDescription = React.forwardRef<
React.ElementRef<typeof Text>,
IToastDescriptionProps
>(({ className, size = 'md', ...props }, ref) => {
Expand Down

0 comments on commit 566c7e1

Please sign in to comment.