Skip to content

Commit 8ae53c6

Browse files
committed
chore: avoid multiline types
1 parent 7adde46 commit 8ae53c6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Tag.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export type TagProps = TagProps.Common &
2424
(TagProps.WithIcon | TagProps.WithoutIcon) &
2525
(TagProps.AsAnchor | TagProps.AsButton | TagProps.AsParagraph | TagProps.AsSpan);
2626
export namespace TagProps {
27+
export type HTMLElement =
28+
| HTMLButtonElement
29+
| HTMLAnchorElement
30+
| HTMLParagraphElement
31+
| HTMLSpanElement;
32+
2733
export type Common = {
2834
id?: string;
2935
className?: string;
@@ -92,10 +98,7 @@ export namespace TagProps {
9298

9399
/** @see <https://components.react-dsfr.codegouv.studio/?path=/docs/components-tag> */
94100
export const Tag = memo(
95-
forwardRef<
96-
HTMLButtonElement | HTMLAnchorElement | HTMLParagraphElement | HTMLSpanElement,
97-
TagProps
98-
>((props, ref) => {
101+
forwardRef<TagProps.HTMLElement, TagProps>((props, ref) => {
99102
const {
100103
id: id_props,
101104
className: prop_className,

0 commit comments

Comments
 (0)