Skip to content
Open
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
12 changes: 6 additions & 6 deletions src/haapi-react-sdk/haapi-stepper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,28 +299,28 @@ const { app, input } = error || {};

##### HAAPI Error Utils

###### HaapiErrorNotifier
###### HaapiStepperErrorNotifier
**Purpose**: Toast-based notification system for HAAPI `AppError`s, and optionally, `InputErrors`s:

**Example Usage**:
```tsx
<HaapiErrorNotifier>
<HaapiStepperErrorNotifier>
<YourApplication />
</HaapiErrorNotifier>
</HaapiStepperErrorNotifier>
```

**Features:**
- Automatically shows notifications for `AppError` and, optionally, `InputError`.
- Auto-dismisses and manually dismisses with a close button.

###### HaapiValidationErrorInputWrapper (Input-Level Errors)
###### HaapiStepperFormValidationErrorInputWrapper (Input-Level Errors)
**Purpose**: A field-specific error display for HAAPI validation `InputError`s:

**Example Usage**:
```tsx
<HaapiValidationErrorInputWrapper fieldName="username">
<HaapiStepperFormValidationErrorInputWrapper fieldName="username">
<input name="username" type="text" />
</HaapiValidationErrorInputWrapper>
</HaapiStepperFormValidationErrorInputWrapper>
```

**Features:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { createPortal } from 'react-dom';
import { useHaapiStepper } from './HaapiStepperHook';
import { HaapiStepperAppError, HaapiStepperInputError } from './haapi-stepper.types';

interface HaapiErrorNotifierProps {
interface HaapiStepperErrorNotifierProps {
children: ReactNode;
showInputErrorNotifications?: boolean;
notificationDuration?: number;
Expand All @@ -27,7 +27,7 @@ export function HaapiStepperErrorNotifier({
showInputErrorNotifications = true,
notificationDuration = 10000,
errorFormatter = defaultErrorFormatter,
}: HaapiErrorNotifierProps) {
}: HaapiStepperErrorNotifierProps) {
const { error } = useHaapiStepper();
const currentError = error?.app ?? (showInputErrorNotifications ? error?.input : null);
const [dismissedError, setDismissedError] = useState<HaapiStepperAppError | HaapiStepperInputError | null>(null);
Expand Down
Loading