-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Types after preact 10.25 #1803
Changes from all commits
2b525c3
3805c3c
355dd16
4ad4126
acc3ee2
35b931f
804fc1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ type ComponentProps = { | |
}; | ||
|
||
export type HTMLButtonAttributes = Omit< | ||
JSX.HTMLAttributes<HTMLButtonElement>, | ||
JSX.ButtonHTMLAttributes<HTMLButtonElement>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just have a question. Are the new If not, we may need to bump the minimum required preact version of this library, since we ship type definitions with it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great question: they've were available from I see only now there was a peer dependency on preact, sorry! In that case, indeed, you'll probably need a bump. You might be able to work out a system if you need to keep compat with older versions, though it might require some tooling. Essentially, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Bumping the minimum required version should be fine 🙂 |
||
'icon' | 'size' | ||
>; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,13 +106,9 @@ export default function LinkButtonPage() { | |
Underline: none (default) | ||
</LinkButton> | ||
|
||
<LinkButton href="https://www.example.com" underline="hover"> | ||
Underline: hover | ||
</LinkButton> | ||
<LinkButton underline="hover">Underline: hover</LinkButton> | ||
|
||
<LinkButton href="https://www.example.com" underline="always"> | ||
Underline: always | ||
</LinkButton> | ||
<LinkButton underline="always">Underline: always</LinkButton> | ||
Comment on lines
-109
to
+111
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The These were probably some old examples from a time in which it may have supported it. |
||
<p> | ||
LinkButtons should be{' '} | ||
<LinkButton underline="always" inline> | ||
|
@@ -131,7 +127,9 @@ export default function LinkButtonPage() { | |
to <code>HTMLButtonElement</code>. | ||
</Library.InfoItem> | ||
<Library.InfoItem label="type"> | ||
<code>{'preact.JSX.HTMLAttributes<HTMLButtonElement>'}</code> | ||
<code> | ||
{'preact.JSX.ButtonHTMLAttributes<HTMLButtonElement>'} | ||
</code> | ||
</Library.InfoItem> | ||
</Library.Info> | ||
</Library.Example> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting minimum required version to 10.25.1 rather than 10.25.0, since it includes some important type fixes.