浏览代码

added accent option in color (#2713)

wassaf shahzad 1 年之前
父节点
当前提交
4d3d9aa717
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      reflex/constants/colors.py
  2. 1 0
      tests/utils/test_serializers.py

+ 1 - 0
reflex/constants/colors.py

@@ -36,6 +36,7 @@ ColorType = Literal[
     "gold",
     "bronze",
     "gray",
+    "accent",
 ]
 
 ShadeType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]

+ 1 - 0
tests/utils/test_serializers.py

@@ -172,6 +172,7 @@ class BaseSubclass(Base):
         ),
         (Color(color="slate", shade=1), "var(--slate-1)"),
         (Color(color="orange", shade=1, alpha=True), "var(--orange-a1)"),
+        (Color(color="accent", shade=1, alpha=True), "var(--accent-a1)"),
     ],
 )
 def test_serialize(value: Any, expected: str):