Skip to content

Commit

Permalink
Add xsmall size for octicons (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron authored Jun 29, 2022
1 parent 1db561d commit de2c7d6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-rice-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Add xsmall size for octicons
2 changes: 2 additions & 0 deletions app/components/primer/octicon_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ module Primer
class OcticonComponent < Primer::Component
status :beta

SIZE_XSMALL = :xsmall
SIZE_DEFAULT = :small
SIZE_MEDIUM = :medium

SIZE_MAPPINGS = {
SIZE_XSMALL => 12,
SIZE_DEFAULT => 16,
SIZE_MEDIUM => 24
}.freeze
Expand Down
2 changes: 1 addition & 1 deletion static/arguments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@
- name: size
type: Symbol
default: "`:small`"
description: One of `:small` (`16`) and `:medium` (`24`).
description: One of `:xsmall` (`12`), `:small` (`16`), or `:medium` (`24`).
- name: use_symbol
type: Boolean
default: "`false`"
Expand Down
5 changes: 4 additions & 1 deletion static/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -644,14 +644,17 @@
"Primer::OcticonComponent": {
"SIZE_DEFAULT": "small",
"SIZE_MAPPINGS": {
"xsmall": 12,
"small": 16,
"medium": 24
},
"SIZE_MEDIUM": "medium",
"SIZE_OPTIONS": [
"xsmall",
"small",
"medium"
]
],
"SIZE_XSMALL": "xsmall"
},
"Primer::OcticonSymbolsComponent": {
},
Expand Down

0 comments on commit de2c7d6

Please sign in to comment.