Skip to content

Commit b4c2e7f

Browse files
[PLAY-1796] Dark Audit Multiple Users (#4139)
**What does this PR do?** A clear and concise description with your runway ticket url. This PR adds dark mode to the number badge that goes along with Multiple Users kit. We change the color of the badges halo from light to dark for both react & rails. **Screenshots:** Screenshots to visualize your addition/change ![Screenshot 2025-01-20 at 3 27 14 PM](https://github.com/user-attachments/assets/5e464ef7-fe65-4156-a48d-af3fa4380be5) **How to test?** Steps to confirm the desired behavior: 1. Go to the [deployed env](https://pr4139.playbook.beta.gm.powerapp.cloud/) 2. Search for 'Multiple Users 3. For both Rails/React switch to dark mode 4. See the badge '+2' change from a light border to dark. #### Checklist: - [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new kit`, `deprecated`, or `breaking`. See [Changelog & Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels) for details. - [x] **DEPLOY** I have added the `milano` label to show I'm ready for a review. - [ ] **TESTS** I have added test coverage to my code. --------- Co-authored-by: Gary Kang <[email protected]>
1 parent 57f235b commit b4c2e7f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

playbook/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
2424
color: $primary;
2525
font-weight: $bold;
2626
font-size: $font_smallest - 1;
27+
28+
&.dark {
29+
border: $pb_multiple_users_border_size solid $bg_dark;
30+
}
2731
}
2832

2933
.multiple_users_badge_xxs {

playbook/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const MultipleUsers = (props: MultipleUsersProps): React.ReactElement => {
5050

5151
const itemClasses = classnames(
5252
'pb_multiple_users_item',
53+
dark && 'dark',
5354
buildCss('multiple_users_badge', avatarSizeClass)
5455
)
5556

playbook/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<% end %>
55

66
<% if object.more_than_four %>
7-
<div class="pb_multiple_users_item multiple_users_badge_<%= object.size %>">
7+
<div class="pb_multiple_users_item multiple_users_badge_<%= object.size %><%= object.dark ? " dark" : "" %>">
88
<%= "+#{object.users.count - object.display_count}" %>
99
</div>
1010
<% end %>

0 commit comments

Comments
 (0)