Skip to content

Commit

Permalink
Add missing 64px Avatar size (#2366)
Browse files Browse the repository at this point in the history
Co-authored-by: camertron <camertron@users.noreply.github.com>
camertron and camertron authored Nov 9, 2023
1 parent 2c5b0b0 commit 73d0561
Showing 5 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/soft-singers-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': minor
---

Add missing 64px Avatar size
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/components/primer/beta/avatar.rb
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ class Avatar < Primer::Component
DEFAULT_SHAPE = :circle
SHAPE_OPTIONS = [DEFAULT_SHAPE, :square].freeze

SIZE_OPTIONS = [16, DEFAULT_SIZE, SMALL_THRESHOLD, 32, 40, 48, 80].freeze
SIZE_OPTIONS = [16, DEFAULT_SIZE, SMALL_THRESHOLD, 32, 40, 48, 64, 80].freeze

# @param src [String] The source url of the avatar image.
# @param alt [String] Passed through to alt on img tag.
6 changes: 6 additions & 0 deletions previews/primer/beta/avatar_preview.rb
Original file line number Diff line number Diff line change
@@ -64,6 +64,12 @@ def size_48
render(Primer::Beta::Avatar.new(size: 48, src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser"))
end

# @label 64px
# @snapshot
def size_64
render(Primer::Beta::Avatar.new(size: 64, src: Primer::ExampleImage::BASE64_SRC, alt: "@kittenuser"))
end

# @label 80px
# @snapshot
def size_80

0 comments on commit 73d0561

Please sign in to comment.