From 08634e396e32b9a30cb33726c8eb922699a5c962 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:36:24 +0300 Subject: [PATCH] R: use React.ComponentProps --- rsconcept/frontend/src/components/props.d.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/rsconcept/frontend/src/components/props.d.ts b/rsconcept/frontend/src/components/props.d.ts index 1b3dbca7..7db589cd 100644 --- a/rsconcept/frontend/src/components/props.d.ts +++ b/rsconcept/frontend/src/components/props.d.ts @@ -66,35 +66,27 @@ export namespace CProps { /** * Represents `div` component with all standard HTML attributes and React-specific properties. */ - export type Div = React.DetailedHTMLProps, HTMLDivElement>; + export type Div = React.ComponentProps<'div'>; /** * Represents `button` component with optional title and HTML attributes. */ - export type Button = Titled & - Omit< - React.DetailedHTMLProps, HTMLButtonElement>, - 'children' | 'type' - >; + export type Button = Titled & Omit, 'children' | 'type'>; /** * Represents `label` component with HTML attributes. */ - export type Label = Omit< - React.DetailedHTMLProps, HTMLLabelElement>, - 'children' - >; + export type Label = Omit, 'children'>; /** * Represents `textarea` component with optional title and HTML attributes. */ - export type TextArea = Titled & - React.DetailedHTMLProps, HTMLTextAreaElement>; + export type TextArea = Titled & React.ComponentProps<'textarea'>; /** * Represents `input` component with optional title and HTML attributes. */ - export type Input = Titled & React.DetailedHTMLProps, HTMLInputElement>; + export type Input = Titled & React.ComponentProps<'input'>; /** * Represents `button` component with optional title and animation properties.