From 934784c588bb558412929ded3b93af89b220e63b Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Mon, 17 Apr 2023 11:55:06 +0300 Subject: [PATCH] chore: Export types for reusable props for Elements Co-authored-by: Mikko Aspiala Signed-off-by: Janne Savolainen --- .../technical-features/ui-components/src/element/elements.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/technical-features/ui-components/src/element/elements.ts b/packages/technical-features/ui-components/src/element/elements.ts index 61f60a69f6..4396fd0aba 100644 --- a/packages/technical-features/ui-components/src/element/elements.ts +++ b/packages/technical-features/ui-components/src/element/elements.ts @@ -1,5 +1,10 @@ import { ElementFor } from "./element"; import type React from "react"; +type PropsByElement = T extends React.ComponentType ? I : never; + export const Div = ElementFor>("div"); +export type DivProps = PropsByElement; + export const Span = ElementFor>("span"); +export type SpanProps = PropsByElement;