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

docs(account-settings): starting docs #3084

Merged
merged 7 commits into from
Nov 29, 2022
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
17 changes: 17 additions & 0 deletions docs/src/data/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,23 @@ export const connectedComponents: ComponentNavItem[] = [
platforms: ['react', 'vue', 'angular', 'react-native'],
tertiary: true,
},
{
href: '/connected-components/account-settings',
label: 'Account Settings',
platforms: ['react'],
},
{
href: '/connected-components/account-settings/change-password',
label: 'Change Password',
platforms: ['react'],
tertiary: true,
},
{
href: '/connected-components/account-settings/delete-user',
label: 'Delete User',
platforms: ['react'],
tertiary: true,
},
{
href: '/connected-components/geo',
label: 'Geo',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Alert } from '@aws-amplify/ui-react';
import { useRouter } from 'next/router';

export const DeveloperPreview = () => {
const {
query: { platform = 'react' },
} = useRouter();
if (platform !== 'react') return null;

return (
<Alert variation="info" heading="Developer Preview">
Account Settings components are currently in developer preview.
</Alert>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: ChangePassword
metaTitle: ChangePassword
description: ChangePassword component enables end users to change their password.
supportedFrameworks: react
---

import { Fragment } from '@/components/Fragment';
import { DeveloperPreview } from '../DeveloperPreview';

<DeveloperPreview />

<Fragment>{({ platform }) => import(`./${platform}.mdx`)}</Fragment>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Change Password

TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: DeleteUser
metaTitle: DeleteUser
description: DeleteUser component allows end users to delete their account permanently from their app.
supportedFrameworks: react
---

import { Fragment } from '@/components/Fragment';
import { DeveloperPreview } from '../DeveloperPreview';

<DeveloperPreview />

<Fragment>{({ platform }) => import(`./${platform}.mdx`)}</Fragment>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Delete User
TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Account Settings
description: Amplify UI provides account settings components to manage account settings.
supportedFrameworks: react
---

import { Fragment } from '@/components/Fragment';
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';
import { DeveloperPreview } from './DeveloperPreview';


export async function getStaticPaths() {
return getCustomStaticPath(frontmatter.supportedFrameworks);
}

{/* `getStaticProps` is required to prevent "Error: getStaticPaths was added without a getStaticProps. Without getStaticProps, getStaticPaths does nothing" */}

export async function getStaticProps() {
return { props: {} }
}

<DeveloperPreview />

## Account Settings

TODO

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ supportedFrameworks: react|react-native
---

import { Fragment } from '@/components/Fragment';
import ReactPropsTable from '@/components/propsTable/ReactPropsTable';
import { getCustomStaticPath } from '@/utils/getCustomStaticPath';

import {
IN_APP_MESSAGE_DISPLAY_PROPS,
MESSAGE_COMPONENTS,
ReactPropsTable,
USE_IN_APP_MESSAGING_API,
} from './props';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default as ReactPropsTable } from './ReactPropsTable';
export {
IN_APP_MESSAGE_DISPLAY_PROPS,
MESSAGE_COMPONENTS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ReactPropsTable from './ReactPropsTable';
import ReactPropsTable from '@/components/propsTable/ReactPropsTable';
import { REACT_NATIVE_MESSAGE_STYLE_PROPS } from './props';

<ReactPropsTable props={REACT_NATIVE_MESSAGE_STYLE_PROPS} />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ReactPropsTable from './ReactPropsTable';
import ReactPropsTable from '@/components/propsTable/ReactPropsTable';
import { REACT_MESSAGE_STYLE_PROPS } from './props';

>The default In-App Messaging components do not handle dark mode using the `ThemeProvider` at this time
Expand Down