Skip to content

An opinionated toast component for React.

type: import types with keyword (#183)

Hossein Mirazimi21dc69745ba9
diff --git a/src/assets.tsx b/src/assets.tsx
index 39109c1..bea35cf 100644
--- a/src/assets.tsx
+++ b/src/assets.tsx
@@ -1,6 +1,6 @@
'use client';
import React from 'react';
-import { ToastTypes } from './types';
+import type { ToastTypes } from './types';
export const getAsset = (type: ToastTypes): JSX.Element | null => {
switch (type) {
diff --git a/src/index.tsx b/src/index.tsx
index bea0219..5d242ed 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -5,7 +5,7 @@ import ReactDOM from 'react-dom';
import './styles.css';
import { getAsset, Loader } from './assets';
-import { HeightT, Position, ToastT, ToastToDismiss, ExternalToast, ToasterProps } from './types';
+import type { HeightT, Position, ToastT, ToastToDismiss, ExternalToast, ToasterProps } from './types';
import { ToastState, toast } from './state';
// Visible toasts amount
diff --git a/src/state.ts b/src/state.ts
index 0c32f11..21ec865 100644
--- a/src/state.ts
+++ b/src/state.ts
@@ -1,5 +1,5 @@
import React from 'react';
-import {
+import type {
ExternalToast,
ToastT,
PromiseData,