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/beta/link.rb
+26-14
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,32 @@ class Link < Primer::Component
30
30
Primer::Alpha::Tooltip.new(**system_arguments)
31
31
}
32
32
33
+
# Leading visuals appear to the left of the link text.
34
+
#
35
+
# Use:
36
+
#
37
+
# - `leading_visual_icon` which accepts the arguments accepted by <%= link_to_component(Primer::Beta::Octicon) %>.
38
+
#
39
+
# @param system_arguments [Hash] Same arguments as <%= link_to_component(Primer::Beta::Octicon) %>.
40
+
renders_one:leading_visual,types: {
41
+
icon: lambda{ |**system_arguments|
42
+
Primer::Beta::Octicon.new(**system_arguments)
43
+
}
44
+
}
45
+
46
+
# Trailing visuals appear to the right of the link text.
47
+
#
48
+
# Use:
49
+
#
50
+
# - `trailing_visual_icon` which accepts the arguments accepted by <%= link_to_component(Primer::Beta::Octicon) %>.
51
+
#
52
+
# @param system_arguments [Hash] Same arguments as <%= link_to_component(Primer::Beta::Octicon) %>.
53
+
renders_one:trailing_visual,types: {
54
+
icon: lambda{ |**system_arguments|
55
+
Primer::Beta::Octicon.new(**system_arguments)
56
+
}
57
+
}
58
+
33
59
# @param href [String] URL to be used for the Link. Required. If the requirements are not met an error will be raised in non production environments. In production, an empty link element will be rendered.
0 commit comments