vault/ui/app/components/form/v2/error-alert.ts
Vault Automation f0cf2a4b68
UI/v2 forms infrastructure (#14134) (#14694)
* copies v2 form components from POC branch

* fixes issue in form-config-generator when path parameters are not defined

* adds api code-generator for snippet creation

* expands cli and terraform code generators

* updates form-config-generator to return api path from spec

* fixes issue setting field value in v2-form class

* updates form-config types

* updates v2 form and renderer components to conditional render fields

* adds v2 form apply component

* updates v2 form wizard component to support apply step

* add support for field types (text input variants, text area, checkbox, radio, masked input) and add test coverage

* Dynamic field visibility and Select field support

* [POC] Public PKI (mocked) Wizard - revert this before merging

* Revert "[POC] Public PKI (mocked) Wizard - revert this before merging"

This reverts commit 66646f1d7a71d0e67028ebcabcfe33925197ffc9.

* cleanup & address copilot pr comments

* address PR comments

---------

Co-authored-by: Shannon Roberts (Beagin) <beagins@users.noreply.github.com>
Co-authored-by: Jordan Reimer <jordan.reimer@hashicorp.com>
2026-05-13 08:46:34 -07:00

29 lines
762 B
TypeScript

/**
* Copyright IBM Corp. 2016, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
import Component from '@glimmer/component';
interface Args {
/** Error message to display */
error?: string;
/** Optional custom title (defaults to "Submission error") */
title?: string;
}
/**
* Form::V2::ErrorAlert displays submission errors in a consistent format.
* Used by both Form::V2 and Form::V2::Wizard for standardized error display.
*
* @example
* ```handlebars
* <Form::V2::ErrorAlert @error={{this.submissionError}} />
* <Form::V2::ErrorAlert @error={{this.error}} @title="Configuration Error" />
* ```
*/
export default class FormV2ErrorAlert extends Component<Args> {
get title(): string {
return this.args.title || 'Submission error';
}
}