Soon UI Design

  • Layout
  • Navigation
  • Input
  • Select
  • Display
  • Feedback

Notification

알림 컴포넌트입니다.
import { Notification } from 'sud-ui';

사용할 때

메세지보다 복잡한 알림을 표시할 때

애플리케이션에서 알림을 푸시할 때

사전 설정

Notification을 사용하기 위해서는 Root Layout에 "<NotificationRoot />"를 포함해야 합니다.
# 1. Using SoonUIDesign Component ## The SoonUIDesign.jsx component file is written as follows. ## You can use theme system, Toast, and Notification all at once without adding them separately. "use client"; import { ThemeProvider } from "../theme/ThemeContext"; import { ToastRoot } from "./feedback/ToastRoot"; import { NotificationRoot } from "./feedback/NotificationRoot"; export const SoonUIDesign = ({ children, theme, darkTheme, isDarkMode }) => { return ( <ThemeProvider theme={theme} darkTheme={darkTheme} isDarkMode={isDarkMode}> {children} <ToastRoot /> <NotificationRoot /> </ThemeProvider> ); }; ## Include the SoonUIDesign component in your Root Layout as follows: "use client"; import { SoonUIDesign } from "sud-ui"; export default function ClientLayout({ children }) { return ( <SoonUIDesign> {children} </SoonUIDesign> ); } ################################################ # 2. Adding Only NotificationRoot "use client"; import { NotificationRoot } from "sud-ui"; export default function ClientLayout({ children }) { return ( <> {children} <NotificationRoot /> </> ); }

사용예제

기본적인 사용방법입니다.
지속 시간을 설정한 알림입니다. duration을 false로 설정하면 자동으로 닫히지 않으며, 표시되는 닫기 버튼으로 직접 닫을 수 있습니다.
스타일을 커스텀할 수 있습니다.
푸터를 포함한 알림입니다.
위치를 설정한 알림입니다.

사용 방법

컴포넌트의 props를 설정하는 방법입니다.
속성 이름
설명
타입
기본값