diff --git a/examples/next-example/src/pages/_app.tsx b/examples/next-example/src/pages/_app.tsx index 6cb9209..833377c 100644 --- a/examples/next-example/src/pages/_app.tsx +++ b/examples/next-example/src/pages/_app.tsx @@ -4,10 +4,8 @@ // import { AppProps } from "next/app"; -import { useMemo } from "react"; import { useYoshiki, - createStyleRegistry, useMobileHover, StyleRegistryProvider, Theme, diff --git a/packages/yoshiki/package.json b/packages/yoshiki/package.json index b94acc7..a7aa2c4 100644 --- a/packages/yoshiki/package.json +++ b/packages/yoshiki/package.json @@ -1,6 +1,6 @@ { "name": "yoshiki", - "version": "1.0.6", + "version": "1.0.7", "author": "Zoe Roux (https://github.com/AnonymusRaccoon)", "license": "MIT", "keywords": [ diff --git a/packages/yoshiki/src/native/generator.tsx b/packages/yoshiki/src/native/generator.tsx index 4177f9a..3ba7227 100644 --- a/packages/yoshiki/src/native/generator.tsx +++ b/packages/yoshiki/src/native/generator.tsx @@ -3,7 +3,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. // -import { PressableProps, useWindowDimensions, ViewStyle } from "react-native"; +import { + ImageStyle, + PressableProps, + TextStyle, + useWindowDimensions, + ViewStyle, +} from "react-native"; import { breakpoints, Theme, useTheme } from "../theme"; import { Breakpoints, @@ -15,8 +21,8 @@ import { } from "../type"; import { isBreakpoints } from "../utils"; import { shorthandsFn } from "../shorthands"; -import { StyleFunc, NativeCssFunc, NativeStyle } from "./type"; -import { useReducer, useRef, useState } from "react"; +import { StyleFunc, NativeCssFunc } from "./type"; +import { useReducer, useRef } from "react"; const useBreakpoint = (): number => { const { width } = useWindowDimensions(); @@ -62,7 +68,7 @@ export const useYoshiki = () => { const breakpoint = useBreakpoint(); const theme = useTheme(); const rerender = useForceRerender(); - const childStyles = useRef>({}); + const childStyles = useRef>({}); const css: NativeCssFunc = (cssList, leftOvers) => { // The as any is because we can't be sure the style type is right one. diff --git a/packages/yoshiki/src/native/type.ts b/packages/yoshiki/src/native/type.ts index 5493e90..89c2396 100644 --- a/packages/yoshiki/src/native/type.ts +++ b/packages/yoshiki/src/native/type.ts @@ -41,19 +41,39 @@ export type StyleFunc