Skip to content

Commit 397a615

Browse files
authored
Merge pull request #83 from dev-five-git/support-generic
Support generic for prop tag
2 parents dcc503a + 77afb9e commit 397a615

File tree

11 files changed

+16
-11
lines changed

11 files changed

+16
-11
lines changed

.changeset/quiet-cooks-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/react": patch
3+
---
4+
5+
Support generic to as prop

packages/react/src/components/Box.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Box<T extends React.ElementType = 'div'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Button<T extends React.ElementType = 'button'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Center.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Center<T extends React.ElementType = 'div'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Flex.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Flex<T extends React.ElementType = 'div'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Grid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Grid<T extends React.ElementType = 'div'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Image<T extends React.ElementType = 'img'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Input<T extends React.ElementType = 'input'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/Text.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function Text<T extends React.ElementType = 'span'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

packages/react/src/components/VStack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Merge } from '../types/utils'
33

44
export function VStack<T extends React.ElementType = 'span'>(
55
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
props: Merge<React.ComponentProps<T>, DevupProps>,
6+
props: Merge<React.ComponentProps<T>, DevupProps<T>>,
77
): React.ReactElement {
88
throw new Error('Cannot run on the runtime')
99
}

0 commit comments

Comments
 (0)