feedback PR Colin
This commit is contained in:
parent
e03696c380
commit
0a0665bb4d
4 changed files with 11 additions and 13 deletions
|
@ -13,11 +13,11 @@ class Dsfr::AlertComponent < ApplicationComponent
|
|||
end
|
||||
|
||||
def alert_class(state)
|
||||
if size == 'small'
|
||||
["fr-alert fr-alert--sm fr-alert--#{state}", extra_class_names].compact.flatten
|
||||
else
|
||||
["fr-alert fr-alert--#{state}", extra_class_names].compact.flatten
|
||||
end
|
||||
class_names(
|
||||
"fr-alert fr-alert--#{state}" => true,
|
||||
"fr-alert--sm" => size == :sm,
|
||||
extra_class_names => true
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%div{ class: alert_class(state) }
|
||||
- if size != 'small'
|
||||
- if size != :sm
|
||||
= content_tag(heading_level, class: 'fr-alert__title') do
|
||||
= "#{prefix_for_state}#{title}"
|
||||
= body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue