Fix web compilation

This commit is contained in:
2023-06-14 10:51:21 +09:00
parent cd44e8e4c3
commit efa743a714
3 changed files with 5 additions and 7 deletions
+2 -2
View File
@@ -22,9 +22,9 @@ import { View, ViewStyle } from "react-native";
import { Image } from "./image";
import { useYoshiki, px, Stylable } from "yoshiki/native";
import { Icon } from "./icons";
import { P } from "./text";
import AccountCircle from "@material-symbols/svg-400/rounded/account_circle-fill.svg";
import { YoshikiStyle } from "yoshiki/dist/type";
import { P } from "@expo/html-elements";
import { ComponentType, forwardRef, RefAttributes } from "react";
import { ts } from "./utils";
@@ -49,7 +49,7 @@ export const Avatar = forwardRef<
{
src?: string | null;
alt?: string;
size?: YoshikiStyle<number | string>;
size?: YoshikiStyle<number>;
placeholder?: string;
color?: string;
isLoading?: boolean;
-1
View File
@@ -50,7 +50,6 @@ const Menu = <AsProps,>({
const [isOpen, setOpen] = useState(false);
useEffect(() => {
console.log("Opnned changed", isOpen);
if (isOpen) onMenuOpen?.call(null);
else onMenuClose?.call(null);
}, [isOpen, onMenuClose, onMenuOpen]);
+3 -4
View File
@@ -19,8 +19,8 @@
*/
import { ComponentType, ComponentProps } from "react";
import { Platform, Text, TextProps, TextStyle } from "react-native";
import { percent, px, rem, useYoshiki } from "yoshiki/native";
import { Platform, Text, TextProps, TextStyle, StyleProp } from "react-native";
import { percent, rem, useYoshiki } from "yoshiki/native";
import {
H1 as EH1,
H2 as EH2,
@@ -29,7 +29,6 @@ import {
H5 as EH5,
H6 as EH6,
P as EP,
LI as ELI,
} from "@expo/html-elements";
import { ts } from "./utils/spacing";
@@ -38,7 +37,7 @@ const styleText = (
type?: "header" | "sub",
custom?: TextStyle,
) => {
const Text = (props: ComponentProps<typeof EP>) => {
const Text = (props: Omit<ComponentProps<typeof EP>, "style"> & { style?: StyleProp<TextStyle> }) => {
const { css, theme } = useYoshiki();
return (