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

Improve floating element adaptive width api #20

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Improve floating element adaptive width api #20

merged 2 commits into from
Sep 12, 2022

Conversation

ycs77
Copy link
Owner

@ycs77 ycs77 commented Sep 12, 2022

Changed

  • Rename as prop to floatingAs
  • Add as prop

If now as is

old rendered:

<button>
  <!-- reference element -->
</button>

<!-- `as` tag rendered start -->
<div>
  <!-- floating element -->
</div>
<!-- `as` tag rendered end -->

new rendered:

<!-- `as` tag rendered start -->
  <button>
    <!-- reference element -->
  </button>

  <!-- `floatingAs` tag rendered start -->
  <div>
    <!-- floating element -->
  </div>
  <!-- `floatingAs` tag rendered end -->
<!-- `as` tag rendered end -->

Usage

Migration

Change as prop to floatingAs (React) / floating-as (Vue).

Linked issue

resolve #13

@ycs77 ycs77 merged commit a7667a3 into main Sep 12, 2022
@ycs77 ycs77 deleted the adaptive-width branch September 12, 2022 16:38
ycs77 added a commit that referenced this pull request Sep 12, 2022
* Add `floatingAs` prop & fix render position of `as` prop
* Update some example has adaptive width
@ycs77 ycs77 added the enhancement New feature or request label Sep 24, 2022
@ycs77 ycs77 changed the title Floating element adaptive width Improve floating element adaptive width api Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react vue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept className as part of FloatProps
1 participant