-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add NeAvatar component #91
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the new NeAvatar component (with stories), extends NeDropdown with a menuHeader
slot, and refines typography and layout for NeModal and NeCard.
- Add NeAvatar component, export, and Storybook stories
- Enhance NeDropdown to support a
menuHeader
slot - Adjust font-weight in NeModal and NeCard titles and hide empty headers in cards
- Add story for cards without a title
Reviewed Changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
stories/NeDropdown.stories.ts | Rename WithSlot to ButtonSlot and add MenuHeaderSlot story |
stories/NeCard.stories.ts | Add WithoutTitle story with no-title card scenario |
stories/NeAvatar.stories.ts | New Storybook file for NeAvatar |
src/main.ts | Export NeAvatar component and AvatarSize type |
src/components/NeModal.vue | Change dialog title class from font-semibold to font-medium |
src/components/NeDropdown.vue | Insert <slot name="menuHeader"> before dropdown items |
src/components/NeCard.vue | Compute when header should show, update font-weight and spacing |
src/components/NeAvatar.vue | New component implementation with image, initials, and placeholder logic |
package.json | Bump version to 3.0.6 |
Comments suppressed due to low confidence (1)
package.json:4
- Since this release adds a new public component (NeAvatar), consider a minor version bump (e.g., 3.1.0) instead of a patch bump to align with semantic versioning.
"version": "3.0.6",
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember to remove the pack pushes
<img | ||
v-if="img && !imageError" | ||
:alt="alt" | ||
:class="`${avatarSizeClasses[size]} ${squared ? 'rounded-sm' : 'rounded-full'}`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:class="`${avatarSizeClasses[size]} ${squared ? 'rounded-sm' : 'rounded-full'}`" | |
:class="[avatarSizeClasses[size], squared ? 'rounded-sm' : 'rounded-full']" |
<div v-else-if="(imageError || !img) && !initials" :class="placeholderContainerClasses"> | ||
<FontAwesomeIcon | ||
:icon="faUser" | ||
:class="`${placeholderColorClasses} ${placeholderIconSizeClasses[size]}`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:class="`${placeholderColorClasses} ${placeholderIconSizeClasses[size]}`" | |
:class="[placeholderColorClasses, placeholderIconSizeClasses[size]]" |
:class="`${placeholderColorClasses} ${placeholderIconSizeClasses[size]}`" | ||
/> | ||
</div> | ||
<div v-else :class="`${placeholderContainerClasses} font-medium`"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div v-else :class="`${placeholderContainerClasses} font-medium`"> | |
<div v-else :class="[placeholderContainerClasses, 'font-medium']"> |
menuHeader
slot