react 용 modal 콤포넌트 (ts) - flymodal
flymodal
* react 용 modal 콤포넌트 (typescript)
- 토스트메세지 띄우기
- 대화상자 띄우기
* DEMO & Docs
https://flyapps.dev/flymodal/
* npm 링크
https://www.npmjs.com/package/flymodal
* 설치
- npm i flymodal
* 임포트
- import flyModal from 'flymodal';
- import 'flymodal/dist/flymodal.css';
* 간편 토스트 메세지 띄우기
- const showToast = () => {
- flyModal.showToast('This is a toast message.');
- };
* 간편 다이얼로그 띄우기
- const showDialog = () => {
- flyModal.showDialog({
- title: 'dialog title',
- content: 'dialog content | multi line,
- buttonList: [
- {
- label: 'cancel',
- onClick: () => {
- console.log('cancel');
- flyModal.closeDialog();
- },
- },
- {
- label: 'ok',
- onClick: () => {
- console.log('ok');
- flyModal.closeDialog();
- },
- isDefault: true,
- },
- ],
- });
- };
* 테스트 영상

react
modal
dialog
toast
toast message
popup
npm
댓글 (0)
등록된 댓글이 없습니다.

