-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2090 from gluestack/release/@gluestack-style/reac…
…[email protected] Release/@gluestack style/[email protected]
- Loading branch information
Showing
41 changed files
with
753 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
example/storybook-nativewind/src/core-components/nativewind/box/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { tva } from '@gluestack-ui/nativewind-utils/tva'; | ||
import { Platform } from 'react-native'; | ||
import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; | ||
|
||
const baseStyle = isWeb | ||
? 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none' | ||
: ''; | ||
|
||
const baseStyle = Platform.select({ | ||
web: 'flex flex-col relative z-0 box-border border-0 list-none min-w-0 min-h-0 bg-transparent items-stretch m-0 p-0 text-decoration-none', | ||
default: '', | ||
}); | ||
export const boxStyle = tva({ | ||
base: baseStyle, | ||
}); |
8 changes: 3 additions & 5 deletions
8
example/storybook-nativewind/src/core-components/nativewind/card/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
example/storybook-nativewind/src/core-components/nativewind/center/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { tva } from '@gluestack-ui/nativewind-utils/tva'; | ||
import { Platform } from 'react-native'; | ||
const baseStyle = Platform.select({ | ||
web: 'flex flex-col relative z-0', | ||
default: '', | ||
}); | ||
import { isWeb } from '@gluestack-ui/nativewind-utils/IsWeb'; | ||
|
||
const baseStyle = isWeb ? 'flex flex-col relative z-0' : ''; | ||
|
||
export const centerStyle = tva({ | ||
base: `justify-center items-center ${baseStyle}`, | ||
}); |
9 changes: 4 additions & 5 deletions
9
example/storybook-nativewind/src/core-components/nativewind/heading/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
example/storybook-nativewind/src/core-components/nativewind/hstack/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
example/storybook-nativewind/src/core-components/nativewind/text/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
example/storybook-nativewind/src/core-components/nativewind/vstack/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const isWeb = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const isWeb = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const isWeb = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const isWeb = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const isWeb = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const isWeb = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import clsx from 'clsx'; | ||
import { twMerge } from 'tailwind-merge'; | ||
export function cn(...inputs) { | ||
return twMerge(clsx(inputs)); | ||
return twMerge(clsx(inputs)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/// <reference types="react" /> | ||
export declare const ParentContext: import('react').Context<{}>; | ||
export declare const ParentContext: import("react").Context<{}>; | ||
export declare const useParentContext: () => any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const cssInterop = (_A, _B) => {}; | ||
const cssInterop = (_A, _B) => { }; | ||
export { cssInterop }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import React from 'react'; | ||
export declare function flush(): React.DetailedReactHTMLElement< | ||
{ | ||
export declare function flush(): React.DetailedReactHTMLElement<{ | ||
id: string; | ||
key: string; | ||
dangerouslySetInnerHTML: { | ||
__html: string; | ||
__html: string; | ||
}; | ||
}, | ||
HTMLElement | ||
>; | ||
}, HTMLElement>; | ||
export declare function setFlushStyles(styles: any): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import React from 'react'; | ||
var flushStyles = ''; | ||
export function flush() { | ||
return React.createElement('style', { | ||
id: 'nativewind-style', | ||
key: 'nativewind-style', | ||
dangerouslySetInnerHTML: { | ||
__html: flushStyles, | ||
}, | ||
}); | ||
return React.createElement('style', { | ||
id: 'nativewind-style', | ||
key: 'nativewind-style', | ||
dangerouslySetInnerHTML: { | ||
__html: flushStyles, | ||
}, | ||
}); | ||
} | ||
export function setFlushStyles(styles) { | ||
flushStyles = styles; | ||
flushStyles = styles; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.