Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Release/@gluestack style/babel plugin styled [email protected] #400

Merged
merged 3 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/babel-plugin-styled-resolver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack-style/babel-plugin-styled-resolver",
"version": "0.2.2-alpha.1",
"version": "0.2.2",
"description": "A gluestack-style babel plugin that transpiles your styled function calls and resolves the component styling in build time.",
"keywords": [
"css-in-js",
Expand Down
8 changes: 2 additions & 6 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ export function getVariantProps(
variantProps[variant] = props[variant];

restProps = {
...restProps,
...theme?.variants[variant][props[variant]]?.props,
...restProps,
};

if (shouldDeleteVariants) {
Expand Down Expand Up @@ -924,7 +924,6 @@ export function verboseStyled<P, Variants, ComCon>(

const NewComp = (
{
as,
children,
//@ts-ignore
orderedResolved: BUILD_TIME_ORDERED_RESOLVED = [],
Expand Down Expand Up @@ -1722,10 +1721,7 @@ export function verboseStyled<P, Variants, ComCon>(
// activeTheme
);
const AsComp: any =
(as as any) ||
resolvedStyleProps.as ||
(passingProps.as as any) ||
undefined;
resolvedStyleProps.as || (passingProps.as as any) || undefined;

let resolvedStyleMemo = [passingProps?.style, ...resolvedStyleProps?.style];
if (Platform.OS === 'web') {
Expand Down