Skip to content

Commit

Permalink
dependency: Added ChakraUI to index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-merlin committed Feb 13, 2024
1 parent 6decf59 commit c017365
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
34 changes: 17 additions & 17 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import React from 'react'
import logo from './logo.svg'
import './App.css'
import { Box, Container, Spinner } from '@chakra-ui/react'

function App (): JSX.Element {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
<div style={{ height: '100vh' }}>
<Container height="100%" display="flex" justifyContent="center" alignItems="center">
<Box
display="flex"
justifyContent="center"
alignItems="center"
height="100px"
>
Learn React
</a>
</header>
<Spinner
thickness='4px'
speed='0.65s'
emptyColor='gray.200'
color='blue.500'
size='xl'
/>
</Box>
</Container>
</div>
)
}
Expand Down
5 changes: 4 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import ReactDOM from 'react-dom/client'
import './index.css'
import App from './App'
import reportWebVitals from './reportWebVitals'
import { ChakraProvider } from '@chakra-ui/react'

const rootElement = document.getElementById('root')

if (rootElement !== null) {
const root = ReactDOM.createRoot(rootElement)
root.render(
<React.StrictMode>
<App />
<ChakraProvider>
<App />
</ChakraProvider>
</React.StrictMode>
)
} else {
Expand Down

0 comments on commit c017365

Please sign in to comment.