chore: changing the name from Component to component

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-07-31 16:19:22 +02:00
parent 484e500f49
commit 4a3885943a
4 changed files with 10 additions and 15 deletions
@@ -27,7 +27,7 @@ describe('AppRootWrapperBlueprint', () => {
it('should return an extension with sensible defaults', () => {
const extension = AppRootWrapperBlueprint.make({
params: {
Component: () => <div>Hello</div>,
component: () => <div>Hello</div>,
},
});
@@ -59,7 +59,7 @@ describe('AppRootWrapperBlueprint', () => {
const extension = AppRootWrapperBlueprint.make({
name: 'test',
params: {
Component: () => <div>Hello</div>,
component: () => <div>Hello</div>,
},
});
@@ -80,7 +80,7 @@ describe('AppRootWrapperBlueprint', () => {
},
*factory(originalFactory, { inputs, config }) {
yield* originalFactory({
Component: ({ children }) => (
component: ({ children }) => (
<div data-testid={`${config.name}-${inputs.children.length}`}>
{children}
{inputs.children.flatMap(c =>
@@ -35,12 +35,7 @@ export const AppRootWrapperBlueprint = createExtensionBlueprint({
dataRefs: {
component: componentDataRef,
},
*factory(params: { Component: ComponentType<PropsWithChildren<{}>> }) {
// todo(blam): not sure that this wrapping is even necessary anymore.
const Component = (props: PropsWithChildren<{}>) => {
return <params.Component>{props.children}</params.Component>;
};
yield componentDataRef(Component);
*factory(params: { component: ComponentType<PropsWithChildren<{}>> }) {
yield componentDataRef(params.component);
},
});
@@ -27,7 +27,7 @@ describe('RouterBlueprint', () => {
it('should return an extension when calling make with sensible defaults', () => {
const extension = RouterBlueprint.make({
params: {
Component: props => <div>{props.children}</div>,
component: props => <div>{props.children}</div>,
},
});
@@ -58,7 +58,7 @@ describe('RouterBlueprint', () => {
it('should work with simple options', async () => {
const extension = RouterBlueprint.make({
params: {
Component: ({ children }) => (
component: ({ children }) => (
<MemoryRouter>
<div data-testid="test-router">{children}</div>
</MemoryRouter>
@@ -94,7 +94,7 @@ describe('RouterBlueprint', () => {
},
*factory(originalFactory, { inputs, config }) {
yield* originalFactory({
Component: ({ children }) => (
component: ({ children }) => (
<MemoryRouter>
<div
data-testid={`test-router-${config.name}-${inputs.children.length}`}
@@ -29,7 +29,7 @@ export const RouterBlueprint = createExtensionBlueprint({
dataRefs: {
component: componentDataRef,
},
*factory({ Component }: { Component: ComponentType<PropsWithChildren<{}>> }) {
yield componentDataRef(Component);
*factory({ component }: { component: ComponentType<PropsWithChildren<{}>> }) {
yield componentDataRef(component);
},
});