diff --git a/example/src/pages/ProfilePage.react.js b/example/src/pages/ProfilePage.react.js index 9e5796dc..64100326 100644 --- a/example/src/pages/ProfilePage.react.js +++ b/example/src/pages/ProfilePage.react.js @@ -28,24 +28,29 @@ function ProfilePage() { name="Peter Richards" backgroundURL="demo/photos/eberhard-grossgasteiger-311213-500.jpg" avatarURL="demo/faces/male/16.jpg" - socialNetworksObjects={[ - { name: "twitter", to: "test", label: "Follow" }, - ]} + twitterURL="test" > Big belly rude boy, million dollar hustler. Unemployed. - + + + + + + + + My Profile @@ -89,10 +94,11 @@ function ProfilePage() { - } - > + + + ) : ( - - + + ); - const itemComponent = {itemContent}; - return tooltip ? ( - - {itemComponent} - - ) : ( - itemComponent - ); + return {itemContent}; }; } diff --git a/src/index.js b/src/index.js index 33c19480..ec44984d 100644 --- a/src/index.js +++ b/src/index.js @@ -45,14 +45,9 @@ export { export { default as FormCard } from "./forms/FormCard.react"; export { default as FormTextInput } from "./forms/FormTextInput.react"; export { default as FormCheckboxInput } from "./forms/FormCheckboxInput.react"; -export { - default as FormWithSingleInputAndButton, -} from "./forms/FormWithSingleInputAndButton.react"; export { default as colors } from "./colors"; export { default as LoginPage } from "./page_templates/account/LoginPage"; export { default as RegisterPage } from "./page_templates/account/RegisterPage"; export { default as ForgotPasswordPage, } from "./page_templates/account/ForgotPasswordPage"; -export { default as ProfilePage } from "./page_templates/account/ProfilePage"; -export { default as ProfileFormCard } from "./forms/ProfileFormCard"; diff --git a/src/page_templates/account/ProfilePage/ProfilePage.examples.md b/src/page_templates/account/ProfilePage/ProfilePage.examples.md deleted file mode 100644 index e69de29b..00000000 diff --git a/src/page_templates/account/ProfilePage/ProfilePage.react.js b/src/page_templates/account/ProfilePage/ProfilePage.react.js deleted file mode 100644 index bd2febfd..00000000 --- a/src/page_templates/account/ProfilePage/ProfilePage.react.js +++ /dev/null @@ -1,343 +0,0 @@ -// @flow - -import * as React from "react"; - -import { - Container, - Grid, - Form, - Profile, - Card, - Button, - Media, - Avatar, - List, - Text, - ProfileFormCard, - FormCard, -} from "../../../"; -import withTouchedErrors from "../../../helpers/withTouchedErrors.react"; - -import defaultStrings from "./ProfilePage.strings"; -import type { stringTypes } from "./ProfilePage.strings"; - -type fieldTypes = {| - email?: string, - password?: string, -|}; - -type touchedTypes = {| - email?: boolean, - password?: boolean, -|}; - -type ProfileProps = {| - name: string, - backgroundURL?: string, - avatarURL?: string, - twitterURL?: string, - bio?: string, - jobTitle?: string, -|}; - -type Props = {| - +strings?: stringTypes, - +action?: string, - +method?: string, - +onSubmit?: Function, - +onChange?: (SyntheticInputEvent) => void, - +onBlur?: (SyntheticInputEvent) => void, - +values?: fieldTypes, - +errors?: fieldTypes, - +touched?: touchedTypes, - ...ProfileProps, -|}; - -/** - * A profile page - * Can be easily wrapped with form libraries like formik and redux-form - * @TODO comments, profile social card, form card profile - */ -function ProfilePage(props: Props): React.Node { - const { - action, - method, - onSubmit, - onChange, - onBlur, - values, - strings = {}, - errors, - } = props; - - const { - name, - backgroundURL, - avatarURL, - twitterURL, - bio, - jobTitle = "", - } = props; - - return ( -
- - - - - - - - - - - } - > - - - - - - - - - - 4 min -
Peter Richards
-
- - Aenean lacinia bibendum nulla sed consectetur. - Vestibulum id ligula porta felis euismod semper. Morbi - leo risus, porta ac consectetur ac, vestibulum at eros. - Cras justo odio, dapibus ac facilisis in, egestas eget - quam. Vestibulum id ligula porta felis euismod semper. - Cum sociis natoque penatibus et magnis dis parturient - montes, nascetur ridiculus mus. - - - - - - Debra Beck: - Donec id elit non mi porta gravida at eget metus. - Vivamus sagittis lacus vel augue laoreet rutrum - faucibus dolor auctor. Donec ullamcorper nulla non - metus auctor fringilla. Praesent commodo cursus - magna, vel scelerisque nisl consectetur et. Sed - posuere consectetur est at lobortis. - - - - - - Jack Ruiz: - Lorem ipsum dolor sit amet, consectetur adipiscing - elit. Fusce dapibus, tellus ac cursus commodo, - tortor mauris condimentum nibh, ut fermentum massa - justo sit amet risus. - - - -
-
-
- - - - - - 12 min -
Peter Richards
-
- - Donec id elit non mi porta gravida at eget metus. - Integer posuere erat a ante venenatis dapibus posuere - velit aliquet. Cum sociis natoque penatibus et magnis - dis parturient montes, nascetur ridiculus mus. Morbi leo - risus, porta ac consectetur ac, vestibulum at eros. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -
-
-
- - - - - - 34 min -
Peter Richards
-
- - Donec ullamcorper nulla non metus auctor fringilla. - Vestibulum id ligula porta felis euismod semper. Aenean - eu leo quam. Pellentesque ornare sem lacinia quam - venenatis vestibulum. Etiam porta sem malesuada magna - mollis euismod. Donec sed odio dui. - - - - - - Wayne Holland: - Donec id elit non mi porta gravida at eget metus. - Vivamus sagittis lacus vel augue laoreet rutrum - faucibus dolor auctor. Donec ullamcorper nulla non - metus auctor fringilla. Praesent commodo cursus - magna, vel scelerisque nisl consectetur et. Sed - posuere consectetur est at lobortis. - - - -
-
-
-
-
- - {/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Oh so, your weak rhyme You doubt I'll bother, reading into - it I'll probably won't, left to my own devices But that's - the difference in our opinions. - - - - - - - - */} -
-
-
-
- ); -} - -const ProfilePageWithTouchedErrors: React.ComponentType< - Props -> = withTouchedErrors(["email", "password"])(ProfilePage); - -export default ProfilePageWithTouchedErrors; diff --git a/src/page_templates/account/ProfilePage/ProfilePage.strings.js b/src/page_templates/account/ProfilePage/ProfilePage.strings.js deleted file mode 100644 index 8bfc2862..00000000 --- a/src/page_templates/account/ProfilePage/ProfilePage.strings.js +++ /dev/null @@ -1,13 +0,0 @@ -//@flow -const strings = { - title: "Forgot Password", - buttonText: "Request Password Change", - emailLabel: "Email Address", - emailPlaceholder: "Enter email", - instructions: - "Enter your email address and your password will be reset and emailed to you.", -}; - -export default strings; - -export type stringTypes = { [$Keys]: string }; diff --git a/src/page_templates/account/ProfilePage/index.js b/src/page_templates/account/ProfilePage/index.js deleted file mode 100644 index 9f1e0cd1..00000000 --- a/src/page_templates/account/ProfilePage/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import ProfilePage from "./ProfilePage.react"; - -export default ProfilePage;