N°2847 - Refactor Button block for a better use of semantic colors, also change "primary" action color to something less flashy

This commit is contained in:
Molkobain
2020-11-02 17:39:10 +01:00
parent 680f522065
commit b454958742
11 changed files with 155 additions and 52 deletions

View File

@@ -56,9 +56,9 @@ class Button extends UIBlock
/** @var string ENUM_COLOR_NEUTRAL */
public const ENUM_COLOR_NEUTRAL = 'neutral';
/** @var string ENUM_COLOR_VALIDATION */
public const ENUM_COLOR_VALIDATION = 'green';
public const ENUM_COLOR_VALIDATION = 'success';
/** @var string ENUM_COLOR_DESTRUCTIVE */
public const ENUM_COLOR_DESTRUCTIVE = 'red';
public const ENUM_COLOR_DESTRUCTIVE = 'danger';
/** @var string ENUM_COLOR_PRIMARY */
public const ENUM_COLOR_PRIMARY = 'primary';
/** @var string ENUM_COLOR_SECONDARY */

View File

@@ -94,8 +94,7 @@ class ButtonFactory
}
/**
* Make a Button component for a validation action, should be used to tell the user he/she going to save / validate / confirm his/her
* choices
* Make a Button component for a success action, should be used to tell the user he/she going to make a positive action/choice
*
* @param string $sLabel
* @param string|null $sName See Button::$sName
@@ -105,7 +104,7 @@ class ButtonFactory
*
* @return \Combodo\iTop\Application\UI\Component\Button\Button
*/
public static function MakeForValidationAction(
public static function MakeForPositiveAction(
string $sLabel,
string $sName = null,
string $sValue = null,