-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Expose tabIndex
on Button
and MenuItem
#484
base: main
Are you sure you want to change the base?
Expose tabIndex
on Button
and MenuItem
#484
Conversation
Run & review this pull request in StackBlitz Codeflow. |
🦋 Changeset detectedLatest commit: 89adbb1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
{...$$restProps} | ||
class={_class} | ||
style={$$props.style ?? ''} | ||
{disabled} | ||
tabindex={tabIndex} |
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.
Hmm... technically this is exposed via ...$$restProps
, although I know intellisense doesn't really work out nice here. Any reason to add it explicitly (and as camel case vs the DOM tabindex
)?
I have hopes to improve this with Svelte 5 using something like...
import type { HTMLButtonAttributes } from 'svelte/elements';
interface MyProps extends HTMLButtonAttributes {
required: string;
optional?: number;
partOfEverythingElse?: boolean;
};
let { required, optional, ...everythingElse }: MyProps = $props();
I've been using...
interface $$Props extends ComponentProps<Chart<TData>> {
series?: typeof series;
labels?: typeof labels;
points?: typeof points;
props?: typeof props;
stackSeries?: typeof stackSeries;
}
a little in the Simplified Charts PR but it's also painful to double declare each prop, so would like to wait til Svelte 5 and $props rune before going too far down that path.
No description provided.