Move formFieldsApiRef and ScaffolderFormFieldsApi to scaffolder-react
The formFieldsApiRef and ScaffolderFormFieldsApi type are now defined and exported from @backstage/plugin-scaffolder-react/alpha, and re-exported from @backstage/plugin-scaffolder/alpha for backwards compatibility. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -14,4 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { type FormField } from './types';
|
||||
import { createApiRef } from '@backstage/frontend-plugin-api';
|
||||
import { ScaffolderFormFieldsApi } from './types';
|
||||
|
||||
export { type FormField, type ScaffolderFormFieldsApi } from './types';
|
||||
|
||||
/** @alpha */
|
||||
export const formFieldsApiRef = createApiRef<ScaffolderFormFieldsApi>({
|
||||
id: 'plugin.scaffolder.form-fields-loader',
|
||||
});
|
||||
|
||||
@@ -18,3 +18,8 @@
|
||||
export interface FormField {
|
||||
readonly $$type: '@backstage/scaffolder/FormField';
|
||||
}
|
||||
|
||||
/** @alpha */
|
||||
export interface ScaffolderFormFieldsApi {
|
||||
loadFormFields(): Promise<FormField[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user