-
General style:
- margin & padding: 10px
- border-radius: 75px
- font-weight: 1000
- font-size: 18px
- display: grid
-
Valid
- text color:
#3C763D
- background color:
#DFFFD8
- icon:
✓
- text color:
-
Info
- text color:
#31708F
- background color:
#D9EDF7
- icon:
🛈
- text color:
-
Alert
- text color:
#FF5D00
- background color:
#FFB149
- icon:
⚠
- text color:
-
Error
- text color:
#FF3331
- background color:
#FFABAB
- icon:
⨂
- text color:
-
Flash::type($message);
With:
- type -> in ['valid', 'info', 'alert', 'error']
- message -> (string)
-
Flash::other($message, $colorText, $backgroundColor, $iconCode)
With:
- message -> (string) message to show
- colorText -> (string) color of text (all color type supported by css suported)
- colorBackgroud -> (string) same of colorText but for background
- iconCode -> Code for icon (prefer hex code)
- Generate message with css style:
Flash::generate();
- Generate message without default style:
Flash::rawGenerate()
Note: for the 2 methods, a class
flash
is added, but, forrawGenerate
, a second class named byflash-type
(with type, the type of message (valid, info, alert, error, other)) is added.