Skip to content

Commit

Permalink
Fix storybook build error
Browse files Browse the repository at this point in the history
  • Loading branch information
tuzkituan committed Apr 21, 2024
1 parent 6beee78 commit 4cb45b4
Show file tree
Hide file tree
Showing 6 changed files with 6,985 additions and 21,178 deletions.
16 changes: 8 additions & 8 deletions lib/components/menu/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AnimatePresence, motion } from "framer-motion";
import { useMemo, useState } from "react";
import { Arrow, useLayer } from "react-laag";
import { useLayer } from "react-laag";
import { twMerge } from "tailwind-merge";
import { useComponentStyle } from "../../customization/styles/theme.context";
import { IMenu, IMenuItem, IMenuKey } from "./menu.types";
Expand All @@ -18,7 +18,7 @@ export const Menu = ({

const theme = useComponentStyle("Menu");

const { triggerProps, layerProps, arrowProps, renderLayer } = useLayer({
const { triggerProps, layerProps, renderLayer } = useLayer({
isOpen: open || isOpen,
placement,
auto: true,
Expand All @@ -41,9 +41,9 @@ export const Menu = ({
return twMerge(theme.itemIcon());
}, [theme]);

const arrowClasses = useMemo(() => {
return twMerge(theme.arrow());
}, [theme]);
// const arrowClasses = useMemo(() => {
// return twMerge(theme.arrow());
// }, [theme]);

const onMenuItemClick = (value: IMenuKey) => {
if (value) {
Expand Down Expand Up @@ -90,14 +90,14 @@ export const Menu = ({
{...layerProps}
>
{renderMenuItems()}
<Arrow
{...arrowProps}
{/* <Arrow
backgroundColor="var(--color-neutral-5)" // color-component-background
borderColor="transparent"
className={arrowClasses}
borderWidth={1}
size={8}
/>
{...arrowProps}
/> */}
</motion.ul>
</AnimatePresence>
)}
Expand Down
14 changes: 7 additions & 7 deletions lib/components/popover/popover.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AnimatePresence, motion } from "framer-motion";
import { useMemo, useState } from "react";
import { Arrow, useLayer } from "react-laag";
import { useLayer } from "react-laag";
import { twMerge } from "tailwind-merge";
import { useComponentStyle } from "../../customization/styles/theme.context";
import { IPopover } from "./popover.types";
Expand All @@ -17,7 +17,7 @@ export const Popover = ({

const theme = useComponentStyle("Popover");

const { triggerProps, layerProps, arrowProps, renderLayer } = useLayer({
const { triggerProps, layerProps, renderLayer } = useLayer({
isOpen: open || isOpen,
placement,
auto: true,
Expand All @@ -32,9 +32,9 @@ export const Popover = ({
return twMerge(theme.base(), popoverClassName);
}, [popoverClassName, theme]);

const arrowClasses = useMemo(() => {
return twMerge(theme.arrow());
}, [theme]);
// const arrowClasses = useMemo(() => {
// return twMerge(theme.arrow());
// }, [theme]);

return (
<>
Expand All @@ -59,14 +59,14 @@ export const Popover = ({
{...layerProps}
>
{content}
<Arrow
{/* <Arrow
{...arrowProps}
backgroundColor="var(--color-neutral-5)" // color-component-background
borderColor="transparent"
className={arrowClasses}
borderWidth={1}
size={8}
/>
/> */}
</motion.div>
</AnimatePresence>
)}
Expand Down
18 changes: 9 additions & 9 deletions lib/components/tooltip/tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Arrow, useHover, useLayer } from "react-laag";
import { AnimatePresence, motion } from "framer-motion";
import { useMemo } from "react";
import { useHover, useLayer } from "react-laag";
import { twMerge } from "tailwind-merge";
import { useComponentStyle } from "../../customization/styles/theme.context";
import { AnimatePresence, motion } from "framer-motion";
import { ITooltip } from "./tooltip.types";
import { useMemo } from "react";

export const Tooltip = ({
children,
Expand All @@ -15,7 +15,7 @@ export const Tooltip = ({

const theme = useComponentStyle("Tooltip");

const { triggerProps, layerProps, arrowProps, renderLayer } = useLayer({
const { triggerProps, layerProps, renderLayer } = useLayer({
isOpen: isHover,
placement,
auto: true,
Expand All @@ -26,9 +26,9 @@ export const Tooltip = ({
return twMerge(theme.base(), tooltipClassName);
}, [tooltipClassName, theme]);

const arrowClasses = useMemo(() => {
return twMerge(theme.arrow());
}, [theme]);
// const arrowClasses = useMemo(() => {
// return twMerge(theme.arrow());
// }, [theme]);

return (
<>
Expand All @@ -46,13 +46,13 @@ export const Tooltip = ({
{...layerProps}
>
{content}
<Arrow
{/* <Arrow
{...arrowProps}
backgroundColor="black"
className={arrowClasses}
borderWidth={1}
size={6}
/>
/> */}
</motion.div>
</AnimatePresence>
)}
Expand Down
Loading

0 comments on commit 4cb45b4

Please sign in to comment.