refactor: rename App to Bootstrap
This commit is contained in:
parent
5daf919bd0
commit
c46242f282
3
.gitignore
vendored
3
.gitignore
vendored
@ -21,3 +21,6 @@
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
Session.vim
|
||||||
|
27
src/App.tsx
27
src/App.tsx
@ -1,27 +0,0 @@
|
|||||||
import React from 'react'
|
|
||||||
|
|
||||||
import logo from './logo.svg'
|
|
||||||
import './App.sass'
|
|
||||||
|
|
||||||
function App() {
|
|
||||||
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"
|
|
||||||
>
|
|
||||||
Learn React
|
|
||||||
</a>
|
|
||||||
</header>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App
|
|
@ -1,15 +1,15 @@
|
|||||||
.App
|
.Bootstrap
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
.App-logo
|
.Bootstrap-logo
|
||||||
height: 40vmin
|
height: 40vmin
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference)
|
@media (prefers-reduced-motion: no-preference)
|
||||||
.App-logo
|
.Bootstrap-logo
|
||||||
animation: App-logo-spin infinite 20s linear
|
animation: Bootstrap-logo-spin infinite 20s linear
|
||||||
|
|
||||||
.App-header
|
.Bootstrap-header
|
||||||
background-color: #282c34
|
background-color: #282c34
|
||||||
min-height: 100vh
|
min-height: 100vh
|
||||||
display: flex
|
display: flex
|
||||||
@ -19,10 +19,10 @@
|
|||||||
font-size: calc(10px + 2vmin)
|
font-size: calc(10px + 2vmin)
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
.App-link
|
.Bootstrap-link
|
||||||
color: #61dafb
|
color: #61dafb
|
||||||
|
|
||||||
@keyframes App-logo-spin
|
@keyframes Bootstrap-logo-spin
|
||||||
from
|
from
|
||||||
transform: rotate(0deg)
|
transform: rotate(0deg)
|
||||||
to
|
to
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render, screen } from '@testing-library/react'
|
import { render, screen } from '@testing-library/react'
|
||||||
|
|
||||||
import App from './App'
|
import Bootstrap from './Bootstrap'
|
||||||
|
|
||||||
test('renders learn react link', () => {
|
test('renders learn react link', () => {
|
||||||
render(<App />)
|
render(<Bootstrap />)
|
||||||
const linkElement = screen.getByText(/learn react/i)
|
const linkElement = screen.getByText(/learn react/i)
|
||||||
expect(linkElement).toBeInTheDocument()
|
expect(linkElement).toBeInTheDocument()
|
||||||
})
|
})
|
27
src/Bootstrap.tsx
Normal file
27
src/Bootstrap.tsx
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import logo from './logo.svg'
|
||||||
|
import './Bootstrap.sass'
|
||||||
|
|
||||||
|
function Bootstrap() {
|
||||||
|
return (
|
||||||
|
<div className="Bootstrap">
|
||||||
|
<header className="Bootstrap-header">
|
||||||
|
<img src={logo} className="Bootstrap-logo" alt="logo" />
|
||||||
|
<p>
|
||||||
|
Edit <code>src/Bootstrap.tsx</code> and save to reload.
|
||||||
|
</p>
|
||||||
|
<a
|
||||||
|
className="Bootstrap-link"
|
||||||
|
href="https://reactjs.org"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Learn React
|
||||||
|
</a>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Bootstrap
|
@ -4,14 +4,14 @@ import { HashRouter as Router } from 'react-router-dom'
|
|||||||
|
|
||||||
import * as serviceWorkerRegistration from './serviceWorkerRegistration'
|
import * as serviceWorkerRegistration from './serviceWorkerRegistration'
|
||||||
import './index.sass'
|
import './index.sass'
|
||||||
import App from './App'
|
import Bootstrap from './Bootstrap'
|
||||||
import reportWebVitals from './reportWebVitals'
|
import reportWebVitals from './reportWebVitals'
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
|
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
|
||||||
root.render(
|
root.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<Router>
|
<Router>
|
||||||
<App />
|
<Bootstrap />
|
||||||
</Router>
|
</Router>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user