From fd4d89e6f313be9917d4f88ee0da574db47e4c11 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Mon, 8 Jul 2024 16:47:59 +0200 Subject: [PATCH] Templates: Export ButtonProps and HeaderProps interfaces Export the ButtonProps and HeaderProps interfaces to make them accessible to avoid issues with Typescript relying on exported interfaces when declaration files should be created. --- code/frameworks/nextjs/template/cli/ts-3-8/Button.tsx | 2 +- code/frameworks/nextjs/template/cli/ts-3-8/Header.tsx | 2 +- code/frameworks/nextjs/template/cli/ts-4-9/Button.tsx | 2 +- code/frameworks/nextjs/template/cli/ts-4-9/Header.tsx | 2 +- code/renderers/react/template/cli/ts-3-8/Button.tsx | 2 +- code/renderers/react/template/cli/ts-3-8/Header.tsx | 2 +- code/renderers/react/template/cli/ts-4-9/Button.tsx | 2 +- code/renderers/react/template/cli/ts-4-9/Header.tsx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/frameworks/nextjs/template/cli/ts-3-8/Button.tsx b/code/frameworks/nextjs/template/cli/ts-3-8/Button.tsx index e3cb2f231141..30a6bcb96e49 100644 --- a/code/frameworks/nextjs/template/cli/ts-3-8/Button.tsx +++ b/code/frameworks/nextjs/template/cli/ts-3-8/Button.tsx @@ -1,7 +1,7 @@ import React from 'react'; import './button.css'; -interface ButtonProps { +export interface ButtonProps { /** * Is this the principal call to action on the page? */ diff --git a/code/frameworks/nextjs/template/cli/ts-3-8/Header.tsx b/code/frameworks/nextjs/template/cli/ts-3-8/Header.tsx index c806ddf023e8..1bf981a4251f 100644 --- a/code/frameworks/nextjs/template/cli/ts-3-8/Header.tsx +++ b/code/frameworks/nextjs/template/cli/ts-3-8/Header.tsx @@ -7,7 +7,7 @@ type User = { name: string; }; -interface HeaderProps { +export interface HeaderProps { user?: User; onLogin?: () => void; onLogout?: () => void; diff --git a/code/frameworks/nextjs/template/cli/ts-4-9/Button.tsx b/code/frameworks/nextjs/template/cli/ts-4-9/Button.tsx index e3cb2f231141..30a6bcb96e49 100644 --- a/code/frameworks/nextjs/template/cli/ts-4-9/Button.tsx +++ b/code/frameworks/nextjs/template/cli/ts-4-9/Button.tsx @@ -1,7 +1,7 @@ import React from 'react'; import './button.css'; -interface ButtonProps { +export interface ButtonProps { /** * Is this the principal call to action on the page? */ diff --git a/code/frameworks/nextjs/template/cli/ts-4-9/Header.tsx b/code/frameworks/nextjs/template/cli/ts-4-9/Header.tsx index c806ddf023e8..1bf981a4251f 100644 --- a/code/frameworks/nextjs/template/cli/ts-4-9/Header.tsx +++ b/code/frameworks/nextjs/template/cli/ts-4-9/Header.tsx @@ -7,7 +7,7 @@ type User = { name: string; }; -interface HeaderProps { +export interface HeaderProps { user?: User; onLogin?: () => void; onLogout?: () => void; diff --git a/code/renderers/react/template/cli/ts-3-8/Button.tsx b/code/renderers/react/template/cli/ts-3-8/Button.tsx index c33be6ec52c4..2b39d6355376 100644 --- a/code/renderers/react/template/cli/ts-3-8/Button.tsx +++ b/code/renderers/react/template/cli/ts-3-8/Button.tsx @@ -1,7 +1,7 @@ import React from 'react'; import './button.css'; -interface ButtonProps { +export interface ButtonProps { /** * Is this the principal call to action on the page? */ diff --git a/code/renderers/react/template/cli/ts-3-8/Header.tsx b/code/renderers/react/template/cli/ts-3-8/Header.tsx index c806ddf023e8..1bf981a4251f 100644 --- a/code/renderers/react/template/cli/ts-3-8/Header.tsx +++ b/code/renderers/react/template/cli/ts-3-8/Header.tsx @@ -7,7 +7,7 @@ type User = { name: string; }; -interface HeaderProps { +export interface HeaderProps { user?: User; onLogin?: () => void; onLogout?: () => void; diff --git a/code/renderers/react/template/cli/ts-4-9/Button.tsx b/code/renderers/react/template/cli/ts-4-9/Button.tsx index c33be6ec52c4..2b39d6355376 100644 --- a/code/renderers/react/template/cli/ts-4-9/Button.tsx +++ b/code/renderers/react/template/cli/ts-4-9/Button.tsx @@ -1,7 +1,7 @@ import React from 'react'; import './button.css'; -interface ButtonProps { +export interface ButtonProps { /** * Is this the principal call to action on the page? */ diff --git a/code/renderers/react/template/cli/ts-4-9/Header.tsx b/code/renderers/react/template/cli/ts-4-9/Header.tsx index c806ddf023e8..1bf981a4251f 100644 --- a/code/renderers/react/template/cli/ts-4-9/Header.tsx +++ b/code/renderers/react/template/cli/ts-4-9/Header.tsx @@ -7,7 +7,7 @@ type User = { name: string; }; -interface HeaderProps { +export interface HeaderProps { user?: User; onLogin?: () => void; onLogout?: () => void;