diff --git a/apps/docs/components/docs/components/codeblock.tsx b/apps/docs/components/docs/components/codeblock.tsx index 57bd680f7e..e68b99f943 100644 --- a/apps/docs/components/docs/components/codeblock.tsx +++ b/apps/docs/components/docs/components/codeblock.tsx @@ -3,7 +3,7 @@ import type {TransformTokensTypes} from "./helper"; import React, {forwardRef, useEffect} from "react"; import {clsx, dataAttr, getUniqueID} from "@nextui-org/shared-utils"; -import BaseHighlight, {Language, PrismTheme, defaultProps} from "prism-react-renderer"; +import BaseHighlight, {defaultProps} from "prism-react-renderer"; import {debounce, omit} from "@nextui-org/shared-utils"; import {cn} from "@nextui-org/react"; diff --git a/apps/docs/content/components/alert/custom-styles.raw.tsx b/apps/docs/content/components/alert/custom-styles.raw.tsx index 9056bf91c8..6ef55f3ea8 100644 --- a/apps/docs/content/components/alert/custom-styles.raw.tsx +++ b/apps/docs/content/components/alert/custom-styles.raw.tsx @@ -3,65 +3,58 @@ import type {AlertProps} from "@nextui-org/react"; import React from "react"; import {Alert, Button, cn} from "@nextui-org/react"; -const CustomAlert = React.forwardRef( - ( - {title, children, variant = "faded", color = "secondary", className, classNames, ...props}, - ref, - ) => { - const colorClass = React.useMemo(() => { - switch (color) { - case "default": - return "before:bg-default-300"; - case "primary": - return "before:bg-primary"; - case "secondary": - return "before:bg-secondary"; - case "success": - return "before:bg-success"; - case "warning": - return "before:bg-warning"; - case "danger": - return "before:bg-danger"; - default: - return "before:bg-default-200"; - } - }, []); +const CustomAlert = ({children, variant, color, className, classNames, ...props}: AlertProps) => { + const colorClass = React.useMemo(() => { + switch (color) { + case "default": + return "before:bg-default-300"; + case "primary": + return "before:bg-primary"; + case "secondary": + return "before:bg-secondary"; + case "success": + return "before:bg-success"; + case "warning": + return "before:bg-warning"; + case "danger": + return "before:bg-danger"; + default: + return "before:bg-default-200"; + } + }, []); - return ( - - {children} - - ); - }, -); + return ( + + {children} + + ); +}; CustomAlert.displayName = "CustomAlert"; export default function App() { - const colors = ["default", "primary", "secondary", "success", "warning", "danger"]; + const colors = ["default", "primary", "secondary", "success", "warning", "danger"] as any; return (
@@ -69,7 +62,7 @@ export default function App() {