diff --git a/app/components/primer/beta/icon_button.rb b/app/components/primer/beta/icon_button.rb index c2217c5fa9..d333a213e7 100644 --- a/app/components/primer/beta/icon_button.rb +++ b/app/components/primer/beta/icon_button.rb @@ -31,6 +31,7 @@ class IconButton < Primer::Component # @param scheme [Symbol] <%= one_of(Primer::Beta::IconButton::SCHEME_OPTIONS) %> # @param size [Symbol] <%= one_of(Primer::Beta::Button::SIZE_OPTIONS) %> # @param disabled [Boolean] Whether or not the button is disabled. If true, this option forces `tag:` to `:button`. + # @param inactive [Boolean] Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button. # @param type [Symbol] <%= one_of(Primer::Beta::BaseButton::TYPE_OPTIONS) %> # @param aria-label [String] String that can be read by assistive technology. A label should be short and concise. See the accessibility section for more information. # @param aria-description [String] String that can be read by assistive technology. A description can be longer as it is intended to provide more context and information. See the accessibility section for more information. @@ -45,6 +46,7 @@ def initialize(icon:, scheme: DEFAULT_SCHEME, wrapper_arguments: {}, show_toolti @system_arguments = system_arguments @system_arguments[:id] ||= self.class.generate_id @system_arguments[:disabled] = disabled + @system_arguments[:inactive] = inactive @system_arguments[:classes] = class_names( "Button", diff --git a/previews/primer/beta/icon_button_preview.rb b/previews/primer/beta/icon_button_preview.rb index 90a975b45d..22caba8dd5 100644 --- a/previews/primer/beta/icon_button_preview.rb +++ b/previews/primer/beta/icon_button_preview.rb @@ -9,6 +9,7 @@ class IconButtonPreview < ViewComponent::Preview # @param size select [small, medium, large] # @param aria_label text # @param disabled toggle + # @param inactive toggle # @param tag select [a, summary, button] # @param icon [Symbol] octicon # @param show_tooltip toggle @@ -18,6 +19,7 @@ def playground( id: "button-preview", tag: :button, disabled: false, + inactive: false, icon: :plus, aria_label: "Button", show_tooltip: true @@ -28,6 +30,7 @@ def playground( id: id, tag: tag, disabled: disabled, + inactive: inactive, icon: icon, "aria-label": aria_label, show_tooltip: show_tooltip