This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #429 from gluestack/release/@gluestack-style/babel…
…-plugin-styled-resolver@0.2.5 Release/@gluestack style/babel plugin styled resolver@0.2.5
- Loading branch information
Showing
7 changed files
with
134 additions
and
126 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
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
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,17 @@ | ||
import React from 'react'; | ||
import Svg from 'react-native-svg'; | ||
import type { RNProps } from './types'; | ||
|
||
const AsForwarder = ({ as, children, ...props }: any) => { | ||
const AsForwarderTemp = ({ | ||
as, | ||
children, | ||
...props | ||
}: any): React.ReactElement => { | ||
const As: any = as; | ||
return as ? <As {...props}>{children}</As> : <Svg {...props}>{children}</Svg>; | ||
}; | ||
AsForwarder.displayName = '__AsForwarder__'; | ||
export { AsForwarder }; | ||
AsForwarderTemp.displayName = '__AsForwarder__'; | ||
|
||
export const AsForwarder = AsForwarderTemp as React.ComponentType< | ||
RNProps & { as?: 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