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

Update Eula Docs for RefreshConfigProps #582

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
31 changes: 20 additions & 11 deletions login-workflow/docs/screens/eula.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@ import { RegistrationContextProvider, EulaScreen } from '@brightlayer-ui/react-a

## API

| Prop Name | Type | Description | Default |
|---|---|---|---|
| eulaContent | `string \| JSX.Element` | The content to render for the EULA. Can be a plain string or HTML. | `t('bluiAuth:EULA.EULA_CONTENT')` |
| checkboxLabel | `string` | The text to render for the acceptance checkbox. | `t('bluiAuth:EULA.ACCEPT_EULA')` |
| checkboxProps | `CheckboxProps` | Props to spread to the MUI [Checkbox](https://mui.com/material-ui/api/checkbox/) component | |
| html | `boolean` | True if the EULA should be rendered as HTML, false for plain text | `false` |
| initialCheckboxValue | `boolean` | Used to pre-populate the checked/unchecked checkbox when the screen loads. | `false` |
| onEulaAcceptedChange | `(accepted: boolean) => void` | Called when the acceptance checkbox clicked. | |
| errorDisplayConfig | `ErrorManagerProps` | See [Error Management](../error-management.md) | |

This screen also extends the `WorkflowCardProps` type for updating the title, instructions, buttons, etc. See [Workflow Card](../components/workflow-card.md) for more details.
| Prop Name | Type | Description | Default |
| -------------------- | ----------------------------- | ------------------------------------------------------------------------------------------ | --------------------------------- |
| eulaContent | `string \| JSX.Element` | The content to render for the EULA. Can be a plain string or HTML. | `t('bluiAuth:EULA.EULA_CONTENT')` |
| checkboxLabel | `string` | The text to render for the acceptance checkbox. | `t('bluiAuth:EULA.ACCEPT_EULA')` |
| checkboxProps | `CheckboxProps` | Props to spread to the MUI [Checkbox](https://mui.com/material-ui/api/checkbox/) component | |
| html | `boolean` | True if the EULA should be rendered as HTML, false for plain text | `false` |
| initialCheckboxValue | `boolean` | Used to pre-populate the checked/unchecked checkbox when the screen loads. | `false` |
| onEulaAcceptedChange | `(accepted: boolean) => void` | Called when the acceptance checkbox clicked. | |
| errorDisplayConfig | `ErrorManagerProps` | See [Error Management](../error-management.md) | |
| refreshConfig | `RefreshConfigProps` | configuration for refresh screen | |

This screen also extends the `WorkflowCardProps` type for updating the title, instructions, buttons, etc. See [Workflow Card](../components/workflow-card.md) for more details.

### RefreshConfigProps

| Prop Name | Type | Description | Default |
| ------------------ | ------------ | --------------------------------- | ------------------------------------------- |
| onRefresh | `() => void` | Function to refresh Eula content | |
| refreshButtonLabel | `string` | Label of refresh button | `t('bluiCommon:MESSAGES.RETRY') // "Retry"` |
| showRefreshButton | `boolean` | the refresh button to be rendered | |
Loading