From de2c7d68ff7d13135c04f5dd40a1e547e41923ba Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Wed, 29 Jun 2022 16:24:16 -0700 Subject: [PATCH] Add xsmall size for octicons (#1201) --- .changeset/proud-rice-report.md | 5 +++++ app/components/primer/octicon_component.rb | 2 ++ static/arguments.yml | 2 +- static/constants.json | 5 ++++- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/proud-rice-report.md diff --git a/.changeset/proud-rice-report.md b/.changeset/proud-rice-report.md new file mode 100644 index 0000000000..d6c6e3baeb --- /dev/null +++ b/.changeset/proud-rice-report.md @@ -0,0 +1,5 @@ +--- +'@primer/view-components': patch +--- + +Add xsmall size for octicons diff --git a/app/components/primer/octicon_component.rb b/app/components/primer/octicon_component.rb index 9f98630119..09bcaf87de 100644 --- a/app/components/primer/octicon_component.rb +++ b/app/components/primer/octicon_component.rb @@ -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 diff --git a/static/arguments.yml b/static/arguments.yml index f2b16be87b..0cd8744dc3 100644 --- a/static/arguments.yml +++ b/static/arguments.yml @@ -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`" diff --git a/static/constants.json b/static/constants.json index b601ba4056..36b96d483d 100644 --- a/static/constants.json +++ b/static/constants.json @@ -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": { },