Skip to content

Commit 13e9d60

Browse files
authoredApr 24, 2024··
fix: remove global styles from final css build (#139)
* fix: remove global styles for body tag * fix: copy global css to styles.css * docs: update docs with warning about prod usage * fix: remove colorscheme from :root
1 parent 1849018 commit 13e9d60

File tree

5 files changed

+613
-3
lines changed

5 files changed

+613
-3
lines changed
 

‎README.md

+5
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ type DevToolsProps = {
125125

126126
```tsx
127127
import { DevTools } from 'jotai-devtools';
128+
// Note that this may get included in your production builds. Please import it conditionally if you want to avoid that
128129
import 'jotai-devtools/styles.css';
129130

130131
const App = () => {
@@ -142,6 +143,7 @@ const App = () => {
142143
```tsx
143144
import { createStore } from 'jotai';
144145
import { DevTools } from 'jotai-devtools';
146+
// Note that this may get included in your production builds. Please import it conditionally if you want to avoid that
145147
import 'jotai-devtools/styles.css';
146148

147149
const customStore = createStore();
@@ -191,6 +193,9 @@ and is replaced it with native CSS.
191193

192194
2. Replace `@emotion/react` with `jotai-devtools/styles.css` in your code
193195

196+
Note that this css file may get included in your production builds please import
197+
it conditionally if you want to avoid that.
198+
194199
```diff
195200
import { DevTools } from 'jotai-devtools';
196201
+ import 'jotai-devtools/styles.css';

‎src/DevTools/Extension/components/Shell/components/TimeTravel/components/SnapshotList/components/RecordHistory.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const RecordHistory = () => {
1313
? 'Stop recording snapshot history'
1414
: 'Record snapshot history';
1515
return (
16-
<Tooltip label={label} openDelay={750}>
16+
<Tooltip label={label} openDelay={750} withinPortal={false}>
1717
<ActionIcon
1818
variant="outline"
1919
color={useThemeMode(

0 commit comments

Comments
 (0)
Please sign in to comment.