Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .storybook/base.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import "@fontsource/inter/variable.css";
import classNames from "classnames";
import { lightTheme, configClass, config, varsClass } from "../src";

export const baseDecorator = (Story) => (
<div
id="folds-root"
className={classNames(lightTheme, configClass, varsClass)}
style={{ fontFamily: config.font.Inter }}
>
<Story />
</div>
);
export const baseDecorator = (Story) => {
document.body.classList.add(lightTheme, configClass, varsClass);
document.body.style.fontFamily = config.font.Inter;

return <Story />;
};
2 changes: 1 addition & 1 deletion src/components/overlay/Overlay.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Overlay = style([
right: 0,
bottom: 0,
left: 0,
zIndex: config.zIndex.Z400,
zIndex: config.zIndex.Max,
},
]);

Expand Down
14 changes: 11 additions & 3 deletions src/components/pop-out/PopOut.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import React, { MutableRefObject, ReactNode, useCallback, useEffect, useRef } from "react";
import React, {
MutableRefObject,
ReactNode,
useCallback,
useEffect,
useLayoutEffect,
useRef,
} from "react";
import { config } from "../../theme";
import { Portal } from "../portal";
import { Align, getRelativeFixedPosition, Position } from "../util";

Expand Down Expand Up @@ -42,7 +50,7 @@ export const PopOut = ({
};
}, [positionPopOut]);

useEffect(() => {
useLayoutEffect(() => {
if (open) positionPopOut();
}, [open, positionPopOut]);

Expand All @@ -58,7 +66,7 @@ export const PopOut = ({
right: 0,
bottom: 0,
left: 0,
zIndex: "$Max",
zIndex: config.zIndex.Max,
}}
>
<div
Expand Down
3 changes: 2 additions & 1 deletion src/components/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import classNames from "classnames";
import React, { MutableRefObject, ReactNode, useEffect, useRef, useState } from "react";
import { config } from "../../theme";
import { as } from "../as";
import { Portal } from "../portal";
import { Align, getRelativeFixedPosition, Position } from "../util";
Expand Down Expand Up @@ -109,7 +110,7 @@ export const TooltipProvider = ({
display: "inline-block",
position: "fixed",
maxWidth: "100vw",
zIndex: "$Max",
zIndex: config.zIndex.Max,
pointerEvents: "none",
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/theme/config.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const [configClass, config] = createTheme({
Z200: "200",
Z300: "300",
Z400: "400",
Max: "999",
Max: "9999",
},
shadow: {
E100: "0px 1px 6px -2px rgba(0, 0, 0, 0.2)",
Expand Down