Version 1
[yaffs-website] / web / core / modules / system / templates / tablesort-indicator.html.twig
diff --git a/web/core/modules/system/templates/tablesort-indicator.html.twig b/web/core/modules/system/templates/tablesort-indicator.html.twig
new file mode 100644 (file)
index 0000000..bc37813
--- /dev/null
@@ -0,0 +1,26 @@
+{#
+/**
+ * @file
+ * Default theme implementation for displaying a tablesort indicator.
+ *
+ * Available variables:
+ * - style: Either 'asc' or 'desc', indicating the sorting direction.
+ *
+ * @ingroup themeable
+ */
+#}
+{%
+  set classes = [
+    'tablesort',
+    'tablesort--' ~ style,
+  ]
+%}
+<span{{ attributes.addClass(classes) }}>
+  <span class="visually-hidden">
+    {% if style == 'asc' -%}
+      {{ 'Sort ascending'|t }}
+    {% else -%}
+      {{ 'Sort descending'|t }}
+    {% endif %}
+  </span>
+</span>