Skip to content

Commit

Permalink
chore: update newtab (create the same like new popup)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykKuniczak committed Nov 5, 2023
1 parent abe4ebf commit c5b0ac6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
41 changes: 20 additions & 21 deletions src/pages/newtab/Newtab.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
.App {
text-align: center;
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
21 changes: 15 additions & 6 deletions src/pages/newtab/Newtab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,31 @@ const Newtab = () => {
const theme = useStorage(exampleThemeStorage);

return (
<div className="App">
<header className="App-header">
<div
className="App"
style={{
backgroundColor: theme === 'light' ? '#ffffff' : '#000000',
}}>
<header className="App-header" style={{ color: theme === 'light' ? '#000' : '#fff' }}>
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/pages/newtab/Newtab.tsx</code> and save to reload.
</p>
<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer">
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
style={{ color: theme === 'light' && '#0281dc', marginBottom: '10px' }}>
Learn React!
</a>
<h6>The color of this paragraph is defined using SASS.</h6>
<button
style={{
color: theme === 'light' ? '#fff' : '#000',
backgroundColor: theme === 'light' ? '#fff' : '#000',
color: theme === 'light' ? '#000' : '#fff',
}}
onClick={exampleThemeStorage.toggle}>
Toggle theme: [{theme}]
Toggle theme
</button>
</header>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Popup = () => {
}}>
<header className="App-header" style={{ color: theme === 'light' ? '#000' : '#fff' }}>
<img src={logo} className="App-logo" alt="logo" />
<p className="">
<p>
Edit <code>src/pages/popup/Popup.tsx</code> and save to reload.
</p>
<a
Expand Down

0 comments on commit c5b0ac6

Please sign in to comment.