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/Avatar builder and component #16

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

Conversation

jzylks
Copy link

@jzylks jzylks commented Jan 4, 2025

An Avatar builder and component, ported from melt-ui:

Screenshot 2025-01-04 at 12 31 30 PM

A couple additional items that were related (let me know if you would like these broken out in a different PR):

  • Adds a StringControl to the preview for modifying the src prop
  • Sets the text color for the interactive preview prop fields to text-gray-100 (it was black on dark gray when not in dark mode)

Copy link

changeset-bot bot commented Jan 4, 2025

⚠️ No Changeset found

Latest commit: 6d139f4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-gen ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 5, 2025 4:03am

jzylks added 3 commits January 4, 2025 21:31
Instead of calling `getters` with the props for the Avatar builder, wrap the
entire `new Avatar()` call in `$derived`. Causes a new instance to be created
if the props change, resetting the loading status.

call in `$derived`
- Previous commit only reset loading status and reloaded the image correctly
  if the `src` prop was changed. If `delayMs` wash change, the loading
  status was reset, but `onload()` never fired. Reverting to using `getters`
- Add `MaybeGetter` to Avatar props
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.

1 participant