Skip to content

Commit

Permalink
feat: add support for most existing primitives (#194)
Browse files Browse the repository at this point in the history
Do not add TextField primitive because it requires special logic
  • Loading branch information
dpilch authored Nov 5, 2021
1 parent feba1f1 commit f1fe271
Show file tree
Hide file tree
Showing 57 changed files with 54,460 additions and 2,889 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function SiteHeader(props: SiteHeaderProps): React.ReactElement {
},
});
return (
/* @ts-ignore: TS2322 */
<Flex
direction=\\"row\\"
justifyContent=\\"space-between\\"
Expand Down Expand Up @@ -75,6 +76,7 @@ export default function CustomButton(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button
color=\\"#ff0000\\"
width={20}
Expand Down Expand Up @@ -105,6 +107,7 @@ export default function CustomText(props: CustomTextProps): React.ReactElement {
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Text
color=\\"#ff0000\\"
width=\\"20px\\"
Expand Down Expand Up @@ -137,6 +140,7 @@ export default function Test(props: TestProps): React.ReactElement {
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<View
fontFamily=\\"Times New Roman\\"
fontSize=\\"20px\\"
Expand Down Expand Up @@ -209,6 +213,7 @@ export default function CollectionOfCustomButtons(
const buttonColor =
buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore;
return (
/* @ts-ignore: TS2322 */
<Collection
type=\\"list\\"
isPaginated={true}
Expand Down Expand Up @@ -303,6 +308,7 @@ export default function CollectionOfCustomButtons(
const buttonColor =
buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore;
return (
/* @ts-ignore: TS2322 */
<Collection
type=\\"list\\"
isPaginated={true}
Expand Down Expand Up @@ -393,6 +399,7 @@ export default function CollectionOfCustomButtons(
const buttonColor =
buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore;
return (
/* @ts-ignore: TS2322 */
<Collection
type=\\"list\\"
isPaginated={true}
Expand Down Expand Up @@ -452,6 +459,7 @@ export default function ListingCardCollection(
model: UntitledModel,
}).items;
return (
/* @ts-ignore: TS2322 */
<Collection
isPaginated=\\"true\\"
collectionType=\\"grid\\"
Expand Down Expand Up @@ -501,6 +509,7 @@ export default function ListingCardCollection(
const { items, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Collection
type=\\"list\\"
isPaginated=\\"true\\"
Expand Down Expand Up @@ -541,6 +550,7 @@ export default function ViewWithButton(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<View {...rest} {...getOverrideProps(overrides, \\"View\\")}>
<Button
color=\\"#ff0000\\"
Expand Down Expand Up @@ -575,6 +585,7 @@ export default function ViewWithCustomButton(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<View {...rest} {...getOverrideProps(overrides, \\"View\\")}>
<CustomButton
color=\\"#ff0000\\"
Expand Down Expand Up @@ -609,6 +620,7 @@ export default function ViewWithButton(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<View {...rest} {...getOverrideProps(overrides, \\"View\\")}>
<Button
color=\\"#ff0000\\"
Expand Down Expand Up @@ -641,6 +653,7 @@ export default function Hi(props: HiProps): React.ReactElement {
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"34px 56px 34px 56px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -695,6 +708,7 @@ export default function VerticalFlexFixed(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"0px 0px 0px 0px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -768,6 +782,7 @@ export default function NewComponent(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"20px 20px 20px 20px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -901,6 +916,7 @@ export default function GroupReference(
...overridesProp,
};
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"10px 10px 10px 10px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -968,6 +984,7 @@ export default function FlexTest(props: FlexTestProps): React.ReactElement {
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"0px 0px 0px 0px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -1022,6 +1039,7 @@ export default function MohitHome(props: MohitHomeProps): React.ReactElement {
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"21px 42px 21px 42px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -1103,6 +1121,7 @@ export default function ImageFlex(props: ImageFlexProps): React.ReactElement {
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Box
width=\\"401px\\"
padding=\\"0px 0px 0px 0px\\"
Expand Down Expand Up @@ -1180,6 +1199,7 @@ export default function VerticalFlexFill(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"0px 0px 0px 0px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -1250,6 +1270,7 @@ export default function TextWithDataBinding(
const { textValue, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Text
color=\\"#ff0000\\"
width=\\"20px\\"
Expand Down Expand Up @@ -1297,6 +1318,7 @@ export default function ComponentWithDataBinding(
} = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button
label={buttonUser?.username || \\"hspain@gmail.com\\"}
labelWidth={width}
Expand Down Expand Up @@ -1334,6 +1356,7 @@ export default function SectionHeading(
const { newProp6fd1, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Flex
padding=\\"0px 0px 10px 0px\\"
backgroundColor=\\"rgb(255,255,255)\\"
Expand Down Expand Up @@ -1398,6 +1421,7 @@ export default function ChildComponentWithDataBinding(
const { textValue, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button {...rest} {...getOverrideProps(overrides, \\"Button\\")}>
<Text {...getOverrideProps(overrides, \\"Button.Text[0]\\")}>
{textValue}
Expand Down Expand Up @@ -1454,7 +1478,10 @@ export default function CustomButton(
...getOverridesFromVariants(variants, props),
...overridesProp,
};
return <Button {...rest} {...getOverrideProps(overrides, \\"Button\\")}></Button>;
return (
/* @ts-ignore: TS2322 */
<Button {...rest} {...getOverrideProps(overrides, \\"Button\\")}></Button>
);
}
",
"declaration": undefined,
Expand Down Expand Up @@ -1487,6 +1514,7 @@ export default function ChildComponentWithDataBoundConcatenation(
const { textValue, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button {...rest} {...getOverrideProps(overrides, \\"Button\\")}>
<Text {...getOverrideProps(overrides, \\"Button.Text[0]\\")}>{\`\${
buttonUser?.firstname || \\"Harrison\\"
Expand Down Expand Up @@ -1520,6 +1548,7 @@ export default function ChildComponentWithStaticConcatenation(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button {...rest} {...getOverrideProps(overrides, \\"Button\\")}>
<Text
{...getOverrideProps(overrides, \\"Button.Text[0]\\")}
Expand Down Expand Up @@ -1562,6 +1591,7 @@ export default function CustomButton(
} = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button
label={\`\${buttonUser?.firstname || \\"Harrison\\"}\${\\" \\"}\${
buttonUser?.lastname || \\"Spain\\"
Expand Down Expand Up @@ -1607,6 +1637,7 @@ export default function CustomButton(
} = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button
label={\`\${buttonUser?.firstname || \\"Harrison\\"}\${\\" \\"}\${
buttonUser?.lastname || \\"Spain\\"
Expand Down Expand Up @@ -1656,6 +1687,7 @@ export default function CustomButton(
const { buttonColor, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Button
disabled={buttonColor && buttonColor === \\"red\\" ? true : false}
{...rest}
Expand Down Expand Up @@ -1684,6 +1716,7 @@ export default function CustomChildren(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<MyView {...rest} {...getOverrideProps(overrides, \\"MyView\\")}>
<CustomButton
{...getOverrideProps(overrides, \\"MyView.CustomButton[0]\\")}
Expand Down Expand Up @@ -1777,6 +1810,7 @@ export default function CustomParentAndChildren(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<ViewTest {...rest} {...getOverrideProps(overrides, \\"ViewTest\\")}>
<CustomButton
{...getOverrideProps(overrides, \\"ViewTest.CustomButton[0]\\")}
Expand Down Expand Up @@ -1873,6 +1907,7 @@ export default function CustomParent(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<MyView {...rest} {...getOverrideProps(overrides, \\"MyView\\")}>
<Button {...getOverrideProps(overrides, \\"MyView.Button[0]\\")}></Button>
</MyView>
Expand Down Expand Up @@ -2124,6 +2159,7 @@ export default function BoundDefaultValue(
const { label, overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Text {...rest} {...getOverrideProps(overrides, \\"Text\\")}>
{label || \\"Bound Default\\"}
</Text>
Expand Down Expand Up @@ -2167,6 +2203,7 @@ export default function CollectionDefaultValue(
model: User,
}).items;
return (
/* @ts-ignore: TS2322 */
<Collection
items={user || []}
{...rest}
Expand Down Expand Up @@ -2214,6 +2251,7 @@ export default function SimpleAndBoundDefaultValue(
} = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Text {...rest} {...getOverrideProps(overrides, \\"Text\\")}>
{label || \\"Bound Double Default\\"}
</Text>
Expand Down Expand Up @@ -2253,6 +2291,7 @@ export default function SimplePropertyBindingDefaultValue(
} = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<Text {...rest} {...getOverrideProps(overrides, \\"Text\\")}>
{label}
</Text>
Expand Down Expand Up @@ -2286,6 +2325,7 @@ export default function ViewWithButton(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<View padding-left {...rest} {...getOverrideProps(overrides, \\"View\\")}>
<CustomButton
color=\\"#ff0000\\"
Expand Down Expand Up @@ -2336,6 +2376,7 @@ export default function SiteHeader(props: SiteHeaderProps): React.ReactElement {
reloadPage: { type: \\"Navigation.Refresh\\" },
});
return (
/* @ts-ignore: TS2322 */
<Flex
direction=\\"row\\"
justifyContent=\\"space-between\\"
Expand Down Expand Up @@ -2403,6 +2444,7 @@ export default function ParsedFixedValues(
const { overrides: overridesProp, ...rest } = props;
const overrides = { ...overridesProp };
return (
/* @ts-ignore: TS2322 */
<View
id=\\"parsed-fixed-values\\"
{...rest}
Expand Down Expand Up @@ -2588,6 +2630,7 @@ export default function Profile(props: ProfileProps): React.ReactElement {
},
} = useAuthenticatedUser();
return (
/* @ts-ignore: TS2322 */
<Flex {...rest} {...getOverrideProps(overrides, \\"Flex\\")}>
<Image
src={userImage}
Expand Down

This file was deleted.

Loading

0 comments on commit f1fe271

Please sign in to comment.