Skip to content

Conversation

elecmonkey
Copy link
Contributor

The v-click directive did not work on the LightOrDark component. Wrapping the slots in a

inside LightOrDark ensures v-click attaches to a real DOM element.

In fact, we could simply write

<div v-click>
  <LightOrDark>
    <template #dark>Dark theme in use</template>
    <template #light>Light theme in use</template>
  </LightOrDark>
</div>

to achieve the same effect, so I’m not sure if this change is meaningful enough. However, it does make usage involving LightOrDark a bit more concise.

Fixes #2271

Copy link

netlify bot commented Sep 26, 2025

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 9381f36
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/68d6cb405e3ffe000807f72d
😎 Deploy Preview https://deploy-preview-2291--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

pkg-pr-new bot commented Sep 26, 2025

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2291

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2291

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2291

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2291

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2291

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2291

commit: 9381f36

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

Successfully merging this pull request may close these issues.

LightOrDark component does not support v-click
1 participant