Skip to content

Commit

Permalink
fix bug of display text in alert when there is no collections (#285)
Browse files Browse the repository at this point in the history
fix the alert message text that is wrapping and overflowing out #266
  • Loading branch information
SirineMhedhbi authored and Bilelkihal committed Aug 1, 2023
1 parent c13af94 commit 76bdcb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/alert_message_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class AlertMessageComponent < ViewComponent::Base
include Turbo::FramesHelper
def initialize(id: '', message: '', type: 'info', closeable: true)
def initialize(id: '', message: nil, type: 'info', closeable: true)
@id = id
@message = message
@type = "alert-#{type}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.alert.alert-dismissible.fade.show{:role => "alert", class: "#{@type}", style: "text-align: left"}
= @message
.alert.alert-dismissible.fade.show{:role => "alert", class: "#{@type}", style: "text-align: left;white-space: normal;"}
= @message || content

- if @closeable
%button.close{"aria-label": "Close", "data-dismiss": "alert", type: "button", style: "background: transparent"}
Expand Down

0 comments on commit 76bdcb7

Please sign in to comment.