Skip to content

Commit

Permalink
feat: show settings in popup page
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-jianliang committed Apr 4, 2024
1 parent 62888c1 commit 5378714
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
30 changes: 15 additions & 15 deletions src/pages/popup/Popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
}

.App-logo {
height: 30vmin;
height: 120px;
pointer-events: none;
}

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

.App-header {
height: 100%;
height: 140px;
display: flex;
flex-direction: column;
align-items: center;
Expand All @@ -35,11 +35,11 @@
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/*@keyframes App-logo-spin {*/
/* from {*/
/* transform: rotate(0deg);*/
/* }*/
/* to {*/
/* transform: rotate(360deg);*/
/* }*/
/*}*/
2 changes: 2 additions & 0 deletions src/pages/popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import useStorage from '@src/shared/hooks/useStorage';
import exampleThemeStorage from '@src/shared/storages/exampleThemeStorage';
import withSuspense from '@src/shared/hoc/withSuspense';
import withErrorBoundary from '@src/shared/hoc/withErrorBoundary';
import Settings from '@pages/content/Settings/Settings';

const Popup = () => {
const theme = useStorage(exampleThemeStorage);
Expand All @@ -18,6 +19,7 @@ const Popup = () => {
<header className="App-header" style={{ color: theme === 'light' ? '#000' : '#fff' }}>
<img src={logo} className="App-logo" alt="logo" />
</header>
<Settings />
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/popup/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
width: 300px;
width: 580px;
height: 260px;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
Expand Down
8 changes: 7 additions & 1 deletion src/pages/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createRoot } from 'react-dom/client';
import '@pages/popup/index.css';
import Popup from '@pages/popup/Popup';
import refreshOnUpdate from 'virtual:reload-on-update-in-view';
import { ChakraProvider } from '@chakra-ui/react';

refreshOnUpdate('pages/popup');

Expand All @@ -12,7 +13,12 @@ function init() {
throw new Error('Can not find #app-container');
}
const root = createRoot(appContainer);
root.render(<Popup />);
// root.render(<Popup />);
root.render(
<ChakraProvider>
<Popup />
</ChakraProvider>,
);
}

init();

0 comments on commit 5378714

Please sign in to comment.