mirror of
https://github.com/zoriya/yoshiki.git
synced 2025-12-06 07:06:13 +00:00
Use yoshiki/native for native and yoshiki for web
This commit is contained in:
@@ -26,5 +26,8 @@
|
||||
"@types/react-native": "~0.69.1",
|
||||
"typescript": "~4.8.4"
|
||||
},
|
||||
"installConfig": {
|
||||
"hoistingLimits": "workspaces"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
6
packages/yoshiki/native.ts
Normal file
6
packages/yoshiki/native.ts
Normal 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";
|
||||
@@ -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",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user