@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
79 lines (70 loc) • 2.2 kB
TypeScript
import React from 'react';
import { ButtonProps, TextFieldProps } from '@mui/material';
export interface AccountResetProps {
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* Default props to TextField Input
* @default {variant: 'outlined'}
*/
TextFieldProps?: TextFieldProps;
/**
* Default props to submit button Input
* @default {variant: 'contained'}
*/
ButtonProps?: ButtonProps;
/**
* Validation code sent by email to the user
* @default empty string
*/
validationCode: string;
/**
* Callback triggered on success sign in
* @default null
*/
onSuccess?: (res: any) => void;
/**
* Action component to display after success message
* */
successAction?: React.ReactNode;
/**
* Callback triggered on error sign in
* @default null
*/
onError?: (res: any) => void;
/**
* Action component to display after error message
* */
errorAction?: React.ReactNode;
/**
* Other props
*/
[p: string]: any;
}
/**
* > API documentation for the Community-JS Account Reset component. Learn about the available props and the CSS API.
*
*
* This component allows users to log in to the application with their usernames and passwords.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/AccountReset)
#### Import
```jsx
import {AccountReset} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCAccountReset` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCAccountReset-root|Styles applied to the root element.|
|form|.SCAccountReset-form|Styles applied to the form element.|
|email|.SCAccountReset-password|Styles applied to the password TextField.|
|success|.SCAccountRecover-success|Styles applied to the success Alert.|
|error|.SCAccountRecover-error|Styles applied to the error Alert.|
*
* @param inProps
*/
export default function AccountReset(inProps: AccountResetProps): JSX.Element;