forked from next-step/react-payments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 카드추가페이지의 개선된 PinInput, BottomSheet 적
- Loading branch information
Showing
9 changed files
with
100 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
import { CardProvider } from 'src/card/providers'; | ||
import { CardAddPage, CardCompletePage, CardListPage, CardPageIndex } from '@/card'; | ||
import { AppDisplay, Funnel } from '@/shared'; | ||
import { CardAddPage, CardCompletePage, CardListPage, CardProvider, CardPageIndex } from '@/card'; | ||
import { AppDisplay, Box, Button, Funnel, OverlayProvider, useModal } from '@/shared'; | ||
|
||
const App = () => ( | ||
<AppDisplay.Root> | ||
<CardProvider> | ||
<Funnel.Root> | ||
<Funnel.Step index={CardPageIndex.CardListPage}> | ||
<CardListPage /> | ||
</Funnel.Step> | ||
<Funnel.Step index={CardPageIndex.CardAddPage}> | ||
<CardAddPage /> | ||
</Funnel.Step> | ||
<Funnel.Step index={CardPageIndex.CardCompletePage}> | ||
<CardCompletePage /> | ||
</Funnel.Step> | ||
</Funnel.Root> | ||
</CardProvider> | ||
</AppDisplay.Root> | ||
); | ||
const App = () => { | ||
const showModal = useModal(); | ||
const openCardApp = () => { | ||
showModal( | ||
<AppDisplay.Root> | ||
<OverlayProvider> | ||
<CardProvider> | ||
<Funnel.Root> | ||
<Funnel.Step index={CardPageIndex.CardListPage}> | ||
<CardListPage /> | ||
</Funnel.Step> | ||
<Funnel.Step index={CardPageIndex.CardAddPage}> | ||
<CardAddPage /> | ||
</Funnel.Step> | ||
<Funnel.Step index={CardPageIndex.CardCompletePage}> | ||
<CardCompletePage /> | ||
</Funnel.Step> | ||
</Funnel.Root> | ||
</CardProvider> | ||
</OverlayProvider> | ||
</AppDisplay.Root>, | ||
{ closeOverlayClick: true }, | ||
); | ||
}; | ||
return ( | ||
<Box width="100%" height="100vh"> | ||
<Button onClick={openCardApp}>열기</Button> | ||
</Box> | ||
); | ||
}; | ||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './CardDisplay'; | ||
export * from './CardSelectBottomSheet'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from '@/App'; | ||
import { GlobalStyles } from '@/shared/styles'; | ||
import { GlobalStyles, OverlayProvider } from '@/shared'; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<GlobalStyles /> | ||
<App /> | ||
<OverlayProvider> | ||
<App /> | ||
</OverlayProvider> | ||
</React.StrictMode>, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters