Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plasmic] Sync project ravi (r&r) #557

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
45 changes: 45 additions & 0 deletions .plasmic/StarRate.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// This is a skeleton starter React component generated by Plasmic.
// This file is owned by you, feel free to edit as you see fit.
import * as React from "react";
import {
PlasmicStarRate,
DefaultStarRateProps
} from "./plasmic/ravi_r_r/PlasmicStarRate";
import { HTMLElementRefOf } from "@plasmicapp/react-web";

// Your component props start with props for variants and slots you defined
// in Plasmic, but you can add more here, like event handlers that you can
// attach to named nodes in your component.
//
// If you don't want to expose certain variants or slots as a prop, you can use
// Omit to hide them:
//
// interface StarRateProps extends Omit<DefaultStarRateProps, "hideProps1"|"hideProp2"> {
// // etc.
// }
//
// You can also stop extending from DefaultStarRateProps altogether and have
// total control over the props for your component.
export interface StarRateProps extends DefaultStarRateProps {}

function StarRate_(props: StarRateProps, ref: HTMLElementRefOf<"div">) {
// Use PlasmicStarRate to render this component as it was
// designed in Plasmic, by activating the appropriate variants,
// attaching the appropriate event handlers, etc. You
// can also install whatever React hooks you need here to manage state or
// fetch data.
//
// Props you can pass into PlasmicStarRate are:
// 1. Variants you want to activate,
// 2. Contents for slots you want to fill,
// 3. Overrides for any named node in the component to attach behavior and data,
// 4. Props to set on the root node.
//
// By default, we are just piping all StarRateProps here, but feel free
// to do whatever works for you.

return <PlasmicStarRate root={{ ref }} {...props} />;
}

const StarRate = React.forwardRef(StarRate_);
export default StarRate;
37 changes: 32 additions & 5 deletions .plasmic/plasmic/ravi_r_r/PlasmicGlobalContextsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import { hasVariant, ensureGlobalVariants } from "@plasmicapp/react-web";
import { AuthGlobalContext } from "@/common/fragment/authGlobalContext"; // plasmic-import: Xco54Kekq-Th/codeComponent
import { Fragment } from "@/common/fragment/designSystemGlobalContext"; // plasmic-import: I9xFO0-CXlvU/codeComponent
import { GrowthbookGlobalContext } from "@/common/fragment/growthbookGlobalContext"; // plasmic-import: lWTHKw5gCzCj/codeComponent
import { Splunk } from "@/common/fragment/splunk"; // plasmic-import: fAahHOA889lI/codeComponent

export interface GlobalContextsProviderProps {
children?: React.ReactElement;
authGlobalContextProps?: Partial<
Omit<React.ComponentProps<typeof AuthGlobalContext>, "children">
>;

fragmentProps?: Partial<
Omit<React.ComponentProps<typeof Fragment>, "children">
>;

growthbookGlobalContextProps?: Partial<
Omit<React.ComponentProps<typeof GrowthbookGlobalContext>, "children">
>;
splunkProps?: Partial<Omit<React.ComponentProps<typeof Splunk>, "children">>;
}

export default function GlobalContextsProvider(
Expand All @@ -32,7 +32,8 @@ export default function GlobalContextsProvider(
children,
authGlobalContextProps,
fragmentProps,
growthbookGlobalContextProps
growthbookGlobalContextProps,
splunkProps
} = props;

return (
Expand All @@ -44,7 +45,19 @@ export default function GlobalContextsProvider(
: undefined
}
>
<Fragment {...fragmentProps}>
<Fragment
{...fragmentProps}
apiConfig={
fragmentProps && "apiConfig" in fragmentProps
? fragmentProps.apiConfig!
: undefined
}
previewApiConfig={
fragmentProps && "previewApiConfig" in fragmentProps
? fragmentProps.previewApiConfig!
: undefined
}
>
<GrowthbookGlobalContext
{...growthbookGlobalContextProps}
apiHost={
Expand All @@ -66,7 +79,21 @@ export default function GlobalContextsProvider(
: undefined
}
>
{children}
<Splunk
{...splunkProps}
defaultApiHost={
splunkProps && "defaultApiHost" in splunkProps
? splunkProps.defaultApiHost!
: undefined
}
defaultApiKey={
splunkProps && "defaultApiKey" in splunkProps
? splunkProps.defaultApiKey!
: undefined
}
>
{children}
</Splunk>
</GrowthbookGlobalContext>
</Fragment>
</AuthGlobalContext>
Expand Down
23 changes: 23 additions & 0 deletions .plasmic/plasmic/ravi_r_r/PlasmicReviewCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,10 @@
> img {
margin-left: var(--token-vMUQwr5Jto1d);
}
.popoverCore:global(.__wab_instance) {
max-width: 100%;
object-fit: cover;
}
.freeBox__qhLa0 {
display: flex;
position: relative;
Expand Down Expand Up @@ -691,6 +695,25 @@
font-size: var(--token-6NbVMeD6zQwn);
position: relative;
}
.freeBox__gJfpv {
display: flex;
flex-direction: row-reverse;
position: relative;
width: 170px;
height: auto;
max-width: 100%;
justify-content: space-between;
align-items: stretch;
box-shadow: 0px 4px 16px 0px #00000033;
background: white;
margin-top: -10px;
border-radius: 8px;
padding: 16px;
border: 1px solid #e2e8f0;
}
.starRate:global(.__wab_instance) {
max-width: 100%;
}
.freeBox__wNjA9 {
display: flex;
flex-direction: row;
Expand Down
Loading