Fix web compilation

This commit is contained in:
Zoe Roux 2023-06-14 10:51:21 +09:00
parent cd44e8e4c3
commit efa743a714
3 changed files with 5 additions and 7 deletions

View File

@ -22,9 +22,9 @@ import { View, ViewStyle } from "react-native";
import { Image } from "./image"; import { Image } from "./image";
import { useYoshiki, px, Stylable } from "yoshiki/native"; import { useYoshiki, px, Stylable } from "yoshiki/native";
import { Icon } from "./icons"; import { Icon } from "./icons";
import { P } from "./text";
import AccountCircle from "@material-symbols/svg-400/rounded/account_circle-fill.svg"; import AccountCircle from "@material-symbols/svg-400/rounded/account_circle-fill.svg";
import { YoshikiStyle } from "yoshiki/dist/type"; import { YoshikiStyle } from "yoshiki/dist/type";
import { P } from "@expo/html-elements";
import { ComponentType, forwardRef, RefAttributes } from "react"; import { ComponentType, forwardRef, RefAttributes } from "react";
import { ts } from "./utils"; import { ts } from "./utils";
@ -49,7 +49,7 @@ export const Avatar = forwardRef<
{ {
src?: string | null; src?: string | null;
alt?: string; alt?: string;
size?: YoshikiStyle<number | string>; size?: YoshikiStyle<number>;
placeholder?: string; placeholder?: string;
color?: string; color?: string;
isLoading?: boolean; isLoading?: boolean;

View File

@ -50,7 +50,6 @@ const Menu = <AsProps,>({
const [isOpen, setOpen] = useState(false); const [isOpen, setOpen] = useState(false);
useEffect(() => { useEffect(() => {
console.log("Opnned changed", isOpen);
if (isOpen) onMenuOpen?.call(null); if (isOpen) onMenuOpen?.call(null);
else onMenuClose?.call(null); else onMenuClose?.call(null);
}, [isOpen, onMenuClose, onMenuOpen]); }, [isOpen, onMenuClose, onMenuOpen]);

View File

@ -19,8 +19,8 @@
*/ */
import { ComponentType, ComponentProps } from "react"; import { ComponentType, ComponentProps } from "react";
import { Platform, Text, TextProps, TextStyle } from "react-native"; import { Platform, Text, TextProps, TextStyle, StyleProp } from "react-native";
import { percent, px, rem, useYoshiki } from "yoshiki/native"; import { percent, rem, useYoshiki } from "yoshiki/native";
import { import {
H1 as EH1, H1 as EH1,
H2 as EH2, H2 as EH2,
@ -29,7 +29,6 @@ import {
H5 as EH5, H5 as EH5,
H6 as EH6, H6 as EH6,
P as EP, P as EP,
LI as ELI,
} from "@expo/html-elements"; } from "@expo/html-elements";
import { ts } from "./utils/spacing"; import { ts } from "./utils/spacing";
@ -38,7 +37,7 @@ const styleText = (
type?: "header" | "sub", type?: "header" | "sub",
custom?: TextStyle, custom?: TextStyle,
) => { ) => {
const Text = (props: ComponentProps<typeof EP>) => { const Text = (props: Omit<ComponentProps<typeof EP>, "style"> & { style?: StyleProp<TextStyle> }) => {
const { css, theme } = useYoshiki(); const { css, theme } = useYoshiki();
return ( return (