Skip to content
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

Link should get a <button variant #705

Open
petemill opened this issue Jun 6, 2024 · 3 comments
Open

Link should get a <button variant #705

petemill opened this issue Jun 6, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@petemill
Copy link
Member

petemill commented Jun 6, 2024

Link component should be allowed to render <button so that we can avoid developers using <Link href="#".

This plan is approved by @AlanBreck and @fallaciousreasoning

@fallaciousreasoning
Copy link
Collaborator

This should involve rendering a

<svelte:element this={isButton ? 'button' : 'a'}>
    ...
</svelte:element>

https://learn.svelte.dev/tutorial/svelte-element

@jonathansampson
Copy link
Collaborator

Instead of svelte:element, would it not be easier to pull in https://github.com/brave/leo/blob/main/src/components/button/button.svelte to return an actual button when isButton is set/true? Otherwise, it seems we'll have quite a bit of work to maintain button-aesthetics across the two components.

@fallaciousreasoning
Copy link
Collaborator

I think the point of this one is to not maintain the button aesthetics - it should always look like a link here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants