diff --git a/plugins/user-settings/api-report.md b/plugins/user-settings/api-report.md index 1323bb8d7f..6167e343d6 100644 --- a/plugins/user-settings/api-report.md +++ b/plugins/user-settings/api-report.md @@ -47,7 +47,7 @@ export const Settings: (props: { icon?: IconComponent }) => JSX.Element; // @public (undocumented) export const SettingsLayout: { (props: SettingsLayoutProps): JSX.Element; - Route: (props: SubRoute) => null; + Route: (props: SettingsLayoutRouteProps) => null; }; // @public (undocumented) @@ -58,7 +58,7 @@ export type SettingsLayoutProps = { }; // @public (undocumented) -export type SubRoute = { +export type SettingsLayoutRouteProps = { path: string; title: string; children: JSX.Element; diff --git a/plugins/user-settings/src/components/SettingsLayout/SettingsLayout.tsx b/plugins/user-settings/src/components/SettingsLayout/SettingsLayout.tsx index 23394819d6..c120c87122 100644 --- a/plugins/user-settings/src/components/SettingsLayout/SettingsLayout.tsx +++ b/plugins/user-settings/src/components/SettingsLayout/SettingsLayout.tsx @@ -28,7 +28,7 @@ import { } from '@backstage/core-plugin-api'; /** @public */ -export type SubRoute = { +export type SettingsLayoutRouteProps = { path: string; title: string; children: JSX.Element; @@ -37,7 +37,7 @@ export type SubRoute = { const dataKey = 'plugin.user-settings.settingsLayoutRoute'; -const Route: (props: SubRoute) => null = () => null; +const Route: (props: SettingsLayoutRouteProps) => null = () => null; attachComponentData(Route, dataKey, true); // This causes all mount points that are discovered within this route to use the path of the route itself @@ -64,7 +64,7 @@ export const SettingsLayout = (props: SettingsLayoutProps) => { withStrictError: 'Child of SettingsLayout must be an SettingsLayout.Route', }) - .getElements() + .getElements() .map(child => child.props), ); diff --git a/plugins/user-settings/src/components/SettingsLayout/index.ts b/plugins/user-settings/src/components/SettingsLayout/index.ts index 36a5633c94..6e610f8078 100644 --- a/plugins/user-settings/src/components/SettingsLayout/index.ts +++ b/plugins/user-settings/src/components/SettingsLayout/index.ts @@ -14,5 +14,8 @@ * limitations under the License. */ -export type { SettingsLayoutProps, SubRoute } from './SettingsLayout'; +export type { + SettingsLayoutProps, + SettingsLayoutRouteProps, +} from './SettingsLayout'; export { SettingsLayout } from './SettingsLayout';