You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/components/primer/alpha/tree_view/node.rb
+16-6Lines changed: 16 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,12 @@ class Node < Primer::Component
48
48
# @return [Symbol]
49
49
attr_reader:node_variant
50
50
51
+
# Whether or not this node is disabled, i.e. cannot be activated.
52
+
#
53
+
# @return [Boolean]
54
+
attr_reader:disabled
55
+
aliasdisabled?disabled
56
+
51
57
DEFAULT_SELECT_VARIANT=:none
52
58
SELECT_VARIANT_OPTIONS=[
53
59
:multiple,
@@ -67,6 +73,7 @@ class Node < Primer::Component
67
73
# @param current [Boolean] Whether or not this node is the current node. The current node is styled differently than regular nodes and is the first element that receives focus when tabbing to the `TreeView` component.
68
74
# @param select_variant [Symbol] Controls the type of checkbox that appears. <%= one_of(Primer::Alpha::TreeView::Node::SELECT_VARIANT_OPTIONS) %>
69
75
# @param checked [Boolean | String] The checked state of the node's checkbox. <%= one_of(Primer::Alpha::TreeView::Node::CHECKED_STATES) %>
76
+
# @param disabled [Boolean] Whether or not the node can be activated. Passing `false` here will cause the node to appear visually disabled but it is still keyboard-focusable.
70
77
# @param content_arguments [Hash] Arguments attached to the node's content, i.e the `<button>` or `<a>` element. <%= link_to_system_arguments_docs %>
0 commit comments