Use yoshiki/native for native and yoshiki for web

This commit is contained in:
Zoe Roux
2022-11-12 20:19:47 +09:00
parent 48666abc24
commit 2935640739
6 changed files with 10 additions and 4 deletions

View File

@@ -26,5 +26,8 @@
"@types/react-native": "~0.69.1",
"typescript": "~4.8.4"
},
"installConfig": {
"hoistingLimits": "workspaces"
},
"private": true
}

View File

@@ -6,7 +6,7 @@
import { StatusBar } from "expo-status-bar";
import { Text, View } from "react-native";
import { registerRootComponent } from "expo";
import { Stylable, useYoshiki } from "yoshiki";
import { Stylable, useYoshiki } from "yoshiki/native";
const CustomBox = ({ color, ...props }: { color: string } & Stylable) => {
const { css } = useYoshiki();

View File

@@ -0,0 +1,6 @@
//
// Copyright (c) Zoe Roux and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
//
export * from "./src/native";

View File

@@ -2,7 +2,6 @@
"name": "yoshiki",
"version": "1.0.0",
"main": "src/index.ts",
"react-native": "src/native/index.ts",
"types": "src/index.ts",
"exports": {
".": "./src/index.ts",

View File

@@ -3,7 +3,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for details.
//
console.log("Web version")
export { type Theme, breakpoints, useTheme } from "./theme";
export {

View File

@@ -3,7 +3,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for details.
//
console.log("native version")
export { type Theme, breakpoints, useTheme } from "../theme";
export { useYoshiki, type Stylable, type CssObject } from "./generator";