Skip to content

Commit

Permalink
Merge pull request #582 from etn-ccis/bug/5682_updateEulaDocs
Browse files Browse the repository at this point in the history
Update Eula Docs for RefreshConfigProps
  • Loading branch information
ektaghag-eaton authored Apr 26, 2024
2 parents 017bdcd + be5da0e commit eb9429d
Showing 1 changed file with 20 additions and 11 deletions.
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 | |

0 comments on commit eb9429d

Please sign in to comment.