Skip to content

Commit

Permalink
upgrade bit.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
amirasalah committed Jun 14, 2020
1 parent 113e0de commit 6000919
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .bitmap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */

{
"theopensystemslab.planx-components/[email protected].2": {
"theopensystemslab.planx-components/[email protected].3": {
"files": [
{
"relativePath": "src/components/Date.tsx",
Expand Down Expand Up @@ -49,7 +49,7 @@
"origin": "AUTHORED",
"exported": true
},
"theopensystemslab.planx-components/[email protected].2": {
"theopensystemslab.planx-components/[email protected].3": {
"files": [
{
"relativePath": "src/pages/SignIn.tsx",
Expand All @@ -73,7 +73,7 @@
"origin": "AUTHORED",
"exported": true
},
"theopensystemslab.planx-components/[email protected].2": {
"theopensystemslab.planx-components/[email protected].3": {
"files": [
{
"relativePath": "src/components/StreetAddress.tsx",
Expand All @@ -97,7 +97,7 @@
"origin": "AUTHORED",
"exported": true
},
"theopensystemslab.planx-components/[email protected].1": {
"theopensystemslab.planx-components/[email protected].2": {
"files": [
{
"relativePath": "src/components/Text.tsx",
Expand Down
1 change: 1 addition & 0 deletions dist/Date.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ interface IDate {
type: string;
options: string[];
inputProps: ILimits;
topSpacing?: number;
includeSubmit?: boolean;
}
interface ILimits {
Expand Down
4 changes: 2 additions & 2 deletions dist/Date.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { useFormik } from "formik";
import * as React from "react";
import FocusWithin from "react-focus-within";
import Question from "./Question";
export const Date = ({ title, type, name, options, inputProps, includeSubmit = false }) => {
export const Date = ({ title, type, name, options, inputProps, topSpacing, includeSubmit = false }) => {
const formik = useFormik({
initialValues: {},
onSubmit: values => {
console.log(JSON.stringify(values, null, 2));
}
});
return (React.createElement(Box, { py: 4 },
return (React.createElement(Box, { py: topSpacing || 4 },
React.createElement(FocusWithin, null, ({ isFocused, getFocusProps }) => (React.createElement("form", Object.assign({ onSubmit: formik.handleSubmit }, getFocusProps()),
title && (React.createElement(Box, { pb: 1 },
React.createElement(Question, { inFocus: isFocused }, title))),
Expand Down
1 change: 1 addition & 0 deletions dist/components/StreetAddress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ interface IStreetAddress {
type: string;
options: string[];
includeLookup?: boolean;
topSpacing?: number;
}
export declare const StreetAddress: React.FC<IStreetAddress>;
export default StreetAddress;
4 changes: 2 additions & 2 deletions dist/components/StreetAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const nations = [
"nation4",
"nation5"
];
export const StreetAddress = ({ title, type, options, includeLookup = false }) => {
export const StreetAddress = ({ title, type, options, includeLookup = false, topSpacing }) => {
const [errorMessageVisible, setErrorMessageVisible] = React.useState(false);
const [successMessageVisible, setSuccessMessageVisible] = React.useState(false);
const [submitButtonDisabled, setSubmitButtonDisabled] = React.useState(true);
Expand Down Expand Up @@ -60,7 +60,7 @@ export const StreetAddress = ({ title, type, options, includeLookup = false }) =
}
};
return (React.createElement(FocusWithin, null, ({ isFocused, getFocusProps }) => (React.createElement("div", Object.assign({}, getFocusProps()),
React.createElement(Box, { py: 4, maxWidth: 480 },
React.createElement(Box, { py: topSpacing || 4, maxWidth: 480 },
React.createElement("form", { "data-testid": "streetAddressForm", onSubmit: formik.handleSubmit },
title && (React.createElement(Box, { mb: 1.5 },
React.createElement(Question, { inFocus: isFocused },
Expand Down
1 change: 1 addition & 0 deletions dist/components/Text.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface IText {
unit?: string;
min?: string;
max?: string;
topSpacing?: number;
maxWords?: number;
inputProps?: IMinMax;
includeSubmit?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions dist/components/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as React from "react";
import FocusWithin from "react-focus-within";
import Messages from "../shared/components/submit-messages";
import Question from "./Question";
export const Text = ({ title, label = false, fullWidth = true, placeholder = "", multiline = false, required = false, name = "", type = "", unit = "", maxWords, inputProps = {
export const Text = ({ title, topSpacing, label = false, fullWidth = true, placeholder = "", multiline = false, required = false, name = "", type = "", unit = "", maxWords, inputProps = {
min: 0,
max: Infinity
}, includeSubmit = false }) => {
Expand All @@ -32,7 +32,7 @@ export const Text = ({ title, label = false, fullWidth = true, placeholder = "",
}
});
return (React.createElement(FocusWithin, null, ({ isFocused, getFocusProps }) => (React.createElement("div", Object.assign({}, getFocusProps()),
React.createElement(Box, { py: 4, maxWidth: 480 },
React.createElement(Box, { py: topSpacing || 4, maxWidth: 480 },
React.createElement("form", { "data-testid": "textForm", onSubmit: formik.handleSubmit },
title && (React.createElement(Box, { mb: 1.5 },
React.createElement(Question, { inFocus: isFocused }, title))),
Expand Down
2 changes: 2 additions & 0 deletions dist/pages/SignIn.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as React from "react";
interface ISignIn {
fullPage?: boolean;
topSpacing?: number;
title?: string;
}
declare const SignIn: React.FC<ISignIn>;
export default SignIn;
8 changes: 4 additions & 4 deletions dist/pages/SignIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const useStyles = makeStyles({
color: "currentColor"
}
});
const SignIn = ({ fullPage }) => {
const SignIn = ({ fullPage, topSpacing, title }) => {
const [email, setEmail] = React.useState("");
const set = useStore(state => state.set);
const handleSubmit = e => {
Expand All @@ -24,9 +24,9 @@ const SignIn = ({ fullPage }) => {
window.location.href = "/";
};
const signInComponent = () => {
return (React.createElement(Box, { maxWidth: 400 },
React.createElement(Typography, { component: "h1", variant: "h3", gutterBottom: true },
React.createElement("strong", null, "Sign in")),
return (React.createElement(Box, { py: topSpacing, maxWidth: 400 },
title && (React.createElement(Typography, { component: "h1", variant: "h3", gutterBottom: true },
React.createElement("strong", null, title))),
React.createElement(Box, { pb: 2 },
"Sign in or",
" ",
Expand Down

0 comments on commit 6000919

Please sign in to comment.