-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Only render <button>
when trigger is present
#2947
Only render <button>
when trigger is present
#2947
Conversation
🦋 Changeset detectedLatest commit: e87ed81 The changes in this PR will be included in the next version bump. 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Hugos68 is attempting to deploy a commit to the Skeleton Labs Team on Vercel. A member of the Team first needs to authorize it. |
@endigo9740 What is the |
This prevents the trigger/popup from being affected by the surrounding flow of styles. So if you do something like this: <div class="space-y-4">
(element)
<Modal>
(element)
<div> We don't want the trigger/modal getting affected by the extra spacing between elements. The span isolates that so it's only affected by the positioning of the Modal logic itself (via Floating UI or w/e). It can be a span, div, etc. But span are inline block by default in case folks embed this within paragraph block: <p class="space-y-4">This is a <Modal> example.<p> If this wasn't a span the text lines would wrap like this:
|
Linked Issue
Closes #2944
Description
Adds an
if
statement around the button to only render it if the snippet is actually passed, this was previously posing an a11y hazard.Changsets
Instructions: Changesets automate our changelog. If you modify files in
/packages
, runpnpm changeset
in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should beminor
while chores and bugfixes should bepatch
. Please prefix the changeset message withfeat:
,bugfix:
orchore:
.Checklist
Please read and apply all contribution requirements.
dev
branch (NEVERmaster
)docs/
,feat/
,chore/
,bugfix/
pnpm ci:check
pnpm format
pnpm test