From 6cea17f00381d03f020e9c929987febfbdefa980 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Fri, 8 May 2026 17:54:09 +0200 Subject: [PATCH] Change custom status example Add Color class to custom status example, if you use plain string the status column will break on the panel. --- docs/5.x/extend/element-types.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/5.x/extend/element-types.md b/docs/5.x/extend/element-types.md index aa61c81e2..97f25fe22 100644 --- a/docs/5.x/extend/element-types.md +++ b/docs/5.x/extend/element-types.md @@ -843,8 +843,8 @@ By default, your elements will support two statuses: Enabled and Disabled. If yo public static function statuses(): array { return [ - 'foo' => ['label' => \Craft::t('plugin-handle', 'Foo'), 'color' => '27AE60'], - 'bar' => ['label' => \Craft::t('plugin-handle', 'Bar'), 'color' => 'F2842D'], + 'foo' => ['label' => \Craft::t('plugin-handle', 'Foo'), 'color' => Color::Indigo], + 'bar' => ['label' => \Craft::t('plugin-handle', 'Bar'), 'color' => Color::Lime], ]; } ```