Skip to content

Commit 030146e

Browse files
removed react-boostrap
1 parent b6c673c commit 030146e

3 files changed

Lines changed: 32 additions & 9 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { css } from '@emotion/react'
2+
3+
export const global = css`
4+
* {
5+
box-sizing: border-box;
6+
}
7+
body {
8+
margin: 0;
9+
}
10+
`

src/components/Atomic/App/App.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
import React from 'react'
2-
import { ToastContainer } from 'react-toastify'
2+
import { Global } from '@emotion/react'
3+
4+
import { Props, defaultProps } from './App.types'
35
import 'react-toastify/dist/ReactToastify.css'
4-
import { Props } from './App.types'
5-
6-
const App = (props: Props) => (
7-
<>
8-
{props.children}
9-
<ToastContainer newestOnTop={true} />
10-
</>
11-
)
6+
import { ToastContainer } from '../Notification'
7+
import * as styles from './App.styles'
8+
9+
const App = (props: Props) => {
10+
const { toastContainerPortalTarget, globalStyle } = { ...defaultProps, ...props }
11+
return (
12+
<>
13+
<Global styles={[globalStyle && styles.global]} />
14+
<ToastContainer portalTarget={toastContainerPortalTarget} showNotifications={true} />
15+
{props.children}
16+
</>
17+
)
18+
}
1219

1320
App.displayName = 'App'
1421

src/components/Atomic/App/App.types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@ import { ReactNode } from 'react'
22

33
export type Props = {
44
children: ReactNode
5+
globalStyle?: boolean
6+
toastContainerPortalTarget?: any
7+
}
8+
9+
export const defaultProps = {
10+
globalStyle: true,
511
}

0 commit comments

Comments
 (0)