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

feat(theme-default): Add icons on action buttons #3795

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

0xlau
Copy link
Contributor

@0xlau 0xlau commented Apr 17, 2024

close #3783

Usages

actions:
    - theme: brand
      text: lorem ipsum
      link: https://test.com
      startIcon:
          src: /test.svg
          alt: test
          width: 18
          height: 18

or

actions:
    - theme: brand
      text: lorem ipsum
      link: https://test.com
      endIcon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="m16.172 11l-5.364-5.364l1.414-1.414L20 12l-7.778 7.778l-1.414-1.414L16.172 13H4v-2z"/></svg>

About Docs

interface HeroAction {

  // .....

  // Show the left icon on action button.
  startIcon?: ActionIcon

  // Show the right icon on action button.
  endIcon?: ActionIcon
}

type ActionIcon =
  | string
  | { src: string; alt?: string; width?: string; height: string }
  | {
      light: string
      dark: string
      alt?: string
      width?: string
      height: string
    }

ScreenShot

image

@0xlau 0xlau changed the title feat(default theme): Add icons on action buttons feat(theme-default): Add icons on action buttons Apr 19, 2024
@brc-dd brc-dd added the needs author action The PR is not ready yet label Apr 26, 2024
@0xlau 0xlau requested a review from brc-dd April 27, 2024 05:32
@brc-dd brc-dd removed the needs author action The PR is not ready yet label Apr 27, 2024
@github-actions github-actions bot added the stale label Jun 9, 2024
@github-actions github-actions bot removed the stale label Jul 17, 2024
@0xlau
Copy link
Contributor Author

0xlau commented Aug 22, 2024

Hi @brc-dd , May I ask when you plan to merge this commit, because I need this feature very much in the future version.
: )

@brc-dd
Copy link
Member

brc-dd commented Aug 22, 2024

Ah, sorry. Slipped my notice. Looks good. I'll check the styles once maybe (grid-related styles aren't needed?) and merge it before next minor release. Also, can you rebase it to resolve conflicts? That should trigger a preview release now, which you can use in meanwhile.

0xlau and others added 2 commits August 23, 2024 00:42
* main: (129 commits)
  ci: prevent multiple cr runs
  ci: use gh cli instead of action-add-labels
  release: v1.3.3
  chore: bump deps
  chore: include node types for client
  docs(ko): re-translation of korean documents (reference/*) (vuejs#4120)
  docs: fix wrong link
  docs(ko): re-translation of korean documents (vuejs#4111)
  docs(ru): update translations (vuejs#4104)
  chore: update changelog wording
  release: v1.3.2
  fix: multiple cache busting imports causing useData to fail
  docs(zh): fix typo (vuejs#4101) [lunaria-ignore]
  chore: bump vue-tsc (for ecosystem-ci)
  ci: adjust job name
  chore: adjust pull request template
  ci: stricter conditions
  chore: adjust pull request template
  chore: adjust pull request template
  ci: skip cr on docs or test only changes
  ...
Copy link

pkg-pr-new bot commented Aug 22, 2024

commit: 930dbc7

pnpm add https://pkg.pr.new/vitepress@3795

Open in Stackblitz

@yamcodes
Copy link

yamcodes commented Sep 3, 2024

Hey, our team could really use this feature! Is there any way I can help to promote its release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[default theme] Icons on action buttons
3 participants