0.0.2 • Published 1 year ago

kuma-modal v0.0.2

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

KumaModal 모달 라이브러리

간단한 모달을 구현할 수 있는 React 전용 라이브러리입니다.

설치 방법

npm i kuma-modal

사용 방법

MyModal 컴포넌트 불러오기

import { KumaModal } from 'kuma-modal';

KumaModal 사용하기

<KumaModal active>
  <h2>제목</h2>
  <p>내용</p>
</KumaModal>

Props

active: 모달 창 열림 여부 children: 모달 내부에 들어갈 컨텐츠입니다.

type Props = {
  active: boolean;
  children?: React.ReactNode;
};

사용 예시

import { KumaModal } from 'kuma-modal';

function App() {
  return (
    <div>
      <KumaModal active>
        <h2>제목</h2>
        <p>내용</p>
      </KumaModal>
    </div>
  );
}

export default App;