Skip to content

Commit 28be9bb

Browse files
committed
Move examples under modals
1 parent 7cfa36e commit 28be9bb

File tree

1 file changed

+22
-22
lines changed
  • packages/module/patternfly-docs/content/extensions/chatbot/examples/UI

1 file changed

+22
-22
lines changed

packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/UI.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -426,24 +426,6 @@ The drawer can also be used to display a list of basic menu items.
426426

427427
```
428428

429-
### Terms of use
430-
431-
Based on the [PatternFly modal](/components/modal), this modal adapts to the ChatBot display mode and is meant to display terms and conditions for using a ChatBot in your project. The image in the header can be toggled on or off depending on whether the `image` and `altText` props are provided.
432-
433-
This example also includes an example of how to use [skip to content](/extensions/chatbot/ui#skip-to-content). When the terms of use modal is open, focus is placed on the terms of use container. When it is closed, focus is placed on the ChatBot. In a real example with a functioning ChatBot toggle, you would also want to place focus on the toggle when appropriate.
434-
435-
```js file="./TermsOfUse.tsx" isFullscreen
436-
437-
```
438-
439-
### Compact terms of use
440-
441-
To apply compact styling to the terms of use modal, pass `isCompact` to `<TermsOfUse>`. This will remove the header image and adjust the spacing of text, so that there is less white space in the modal.
442-
443-
```js file="./TermsOfUseCompact.tsx" isFullscreen
444-
445-
```
446-
447429
### Settings
448430

449431
To contain user preference controls and other ChatBot setting options, you can create a separate settings page that can accept any number of buttons, dropdown menus, toggles, labels, and so on. This settings page will render all components appropriately within all 4 display modes.
@@ -462,6 +444,16 @@ To make the settings menu compact, with less spacing between the menu contents,
462444

463445
```
464446

447+
## Modals
448+
449+
### Modal
450+
451+
Based on the [PatternFly modal](/components/modal), this modal adapts to the ChatBot display mode and accepts components typically used in a modal. It is primarily used and tested in the context of the attachment modals, but you can customize this modal to adapt it to other use cases as needed. The modal will overlay the ChatBot in default and docked modes, and will behave more like a traditional PatternFly modal in fullscreen and embedded modes.
452+
453+
```js file="./ChatbotModal.tsx" isFullscreen
454+
455+
```
456+
465457
### Onboarding
466458

467459
You can use the onboarding modal to introduce users to your ChatBot and provide necessary information. The title, image, and body text are customizable.
@@ -478,12 +470,20 @@ To make the onboarding modal compact, with less spacing, pass `isCompact` to the
478470

479471
```
480472

481-
## Modals
473+
### Terms of use
482474

483-
### Modal
475+
Based on the [PatternFly modal](/components/modal), this modal adapts to the ChatBot display mode and is meant to display terms and conditions for using a ChatBot in your project. The image in the header can be toggled on or off depending on whether the `image` and `altText` props are provided.
484476

485-
Based on the [PatternFly modal](/components/modal), this modal adapts to the ChatBot display mode and accepts components typically used in a modal. It is primarily used and tested in the context of the attachment modals, but you can customize this modal to adapt it to other use cases as needed. The modal will overlay the ChatBot in default and docked modes, and will behave more like a traditional PatternFly modal in fullscreen and embedded modes.
477+
This example also includes an example of how to use [skip to content](/patternfly-ai/chatbot/ui#skip-to-content). When the terms of use modal is open, focus is placed on the terms of use container. When it is closed, focus is placed on the ChatBot. In a real example with a functioning ChatBot toggle, you would also want to place focus on the toggle when appropriate.
486478

487-
```js file="./ChatbotModal.tsx" isFullscreen
479+
```js file="./TermsOfUse.tsx" isFullscreen
480+
481+
```
482+
483+
### Compact terms of use
484+
485+
To apply compact styling to the terms of use modal, pass `isCompact` to `<TermsOfUse>`. This will remove the header image and adjust the spacing of text, so that there is less white space in the modal.
486+
487+
```js file="./TermsOfUseCompact.tsx" isFullscreen
488488

489489
```

0 commit comments

Comments
 (0)