Module: Fluxbit::IconHelpers
- Included in:
- Component
- Defined in:
- app/components/fluxbit/icon_helpers.rb
Instance Method Summary collapse
- #chevron_double_left(**props) ⇒ Object
- #chevron_double_right(**props) ⇒ Object
- #chevron_down(**props) ⇒ Object
- #chevron_left(**props) ⇒ Object
- #chevron_right(**props) ⇒ Object
- #chevron_up(**props) ⇒ Object
- #close_icon(**props) ⇒ Object
- #ellipsis_horizontal(**props) ⇒ Object
- #eye_icon(**props) ⇒ Object
- #eye_slash_icon(**props) ⇒ Object
- #plus_icon(**props) ⇒ Object
Instance Method Details
#chevron_double_left(**props) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'app/components/fluxbit/icon_helpers.rb', line 83 def chevron_double_left(**props) add to: props, class: "w-3 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 10 10" stroke_width = props.delete(:stroke_width) || 2 tag.svg(**props) do safe_join [ tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "M4 1l-4 4 4 4"), tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "M10 1l-4 4 4 4") ] end end |
#chevron_double_right(**props) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'app/components/fluxbit/icon_helpers.rb', line 100 def chevron_double_right(**props) add to: props, class: "w-3 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 12 10" stroke_width = props.delete(:stroke_width) || 2 tag.svg(**props) do safe_join [ tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "M2 1l4 4-4 4"), tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "M8 1l4 4-4 4") ] end end |
#chevron_down(**props) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'app/components/fluxbit/icon_helpers.rb', line 47 def chevron_down(**props) add to: props, class: "w-2.5 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 10 6" stroke_width = props.delete(:stroke_width) || 2 tag.svg(**props) do tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "m1 1 4 4 4-4") end end |
#chevron_left(**props) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/components/fluxbit/icon_helpers.rb', line 19 def chevron_left(**props) add to: props, class: "w-2.5 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 6 10" stroke_width = props.delete(:stroke_width) || 2 tag.svg(**props) do tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "m5 1-4 4 4 4") end end |
#chevron_right(**props) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/components/fluxbit/icon_helpers.rb', line 5 def chevron_right(**props) add to: props, class: "w-2.5 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 6 10" stroke_width = props.delete(:stroke_width) || 2 tag.svg(**props) do tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "m1 9 4-4-4-4") end end |
#chevron_up(**props) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/components/fluxbit/icon_helpers.rb', line 33 def chevron_up(**props) add to: props, class: "w-2.5 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 10 6" stroke_width = props.delete(:stroke_width) || 2 tag.svg(**props) do tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => stroke_width, d: "m1 5 4-4 4 4") end end |
#close_icon(**props) ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'app/components/fluxbit/icon_helpers.rb', line 61 def close_icon(**props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 14 14" tag.svg(**props) do tag.path(stroke: "currentColor", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => 2, d: "m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6") end end |
#ellipsis_horizontal(**props) ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'app/components/fluxbit/icon_helpers.rb', line 117 def ellipsis_horizontal(**props) add to: props, class: "w-2.5 h-2.5", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "currentColor" props[:viewBox] = "0 0 10 2" tag.svg(**props) do safe_join [ tag.circle(cx: 1, cy: 1, r: 1), tag.circle(cx: 5, cy: 1, r: 1), tag.circle(cx: 9, cy: 1, r: 1) ] end end |
#eye_icon(**props) ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'app/components/fluxbit/icon_helpers.rb', line 134 def eye_icon(**props) add to: props, class: "size-4", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 24 24" props[:"stroke-width"] = "1.5" props[:stroke] = "currentColor" tag.svg(**props) do safe_join [ tag.path("stroke-linecap" => "round", "stroke-linejoin" => "round", d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"), tag.path("stroke-linecap" => "round", "stroke-linejoin" => "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z") ] end end |
#eye_slash_icon(**props) ⇒ Object
152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'app/components/fluxbit/icon_helpers.rb', line 152 def eye_slash_icon(**props) add to: props, class: "size-4", first_element: true remove_class_from_props(props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "none" props[:viewBox] = "0 0 24 24" props[:"stroke-width"] = "1.5" props[:stroke] = "currentColor" tag.svg(**props) do tag.path("stroke-linecap" => "round", "stroke-linejoin" => "round", d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88") end end |
#plus_icon(**props) ⇒ Object
72 73 74 75 76 77 78 79 80 81 |
# File 'app/components/fluxbit/icon_helpers.rb', line 72 def plus_icon(**props) props["aria-hidden"] = "true" props[:xmlns] = "http://www.w3.org/2000/svg" props[:fill] = "currentColor" props[:viewBox] = "0 0 24 24" tag.svg(**props) do tag.path("fill-rule" => "evenodd", d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z", "clip-rule" => "evenodd") end end |