Skip to content

Commit

Permalink
add style to alert
Browse files Browse the repository at this point in the history
  • Loading branch information
yujia10 committed Jun 16, 2022
1 parent c9ec091 commit e95d9d1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
33 changes: 21 additions & 12 deletions app/assets/stylesheets/components/_flash_message.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
// .notice-flash {
// width: auto;
// position: fixed;
// top: 100px;
// right: 16px;
// height: 50px;
// background-color: rgb(241, 247, 159);
// box-shadow: 0 10px 30px rgba(0,0,0,.1);
// border: 1px solid black;
// border-radius: 4px;

// }
.notice-flash {
width: auto;
position: fixed;
top: 100px;
right: 16px;
height: 50px;
color: #325288;
background-color: #F4F4F4;
box-shadow: 0 10px 30px rgba(0,0,0,.1);
border-radius: 4px;
}
.button-alert {
background-color: #d0eaf7 !important;
color: black;
font-size: 14px;
font-weight: 400;
border: none;
border-radius: 2em;
padding: 5px 12px;
margin: 4px 5px 0 0;
}
2 changes: 1 addition & 1 deletion app/controllers/applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def create
# end
end
ChildcareMailer.with(applications: @applications, user:current_user).new_childcare_email.deliver_now
redirect_to root_path, flash: {notice: "Application was submitted Successfully, check your email"}
redirect_to root_path, flash: {notice: "Application was submitted Successfully. Check your email for details."}
end

def destroy
Expand Down
14 changes: 7 additions & 7 deletions app/views/shared/_flashes.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<%# <% if notice %>
<%# <div class="alert alert-info alert-dismissible fade show m-1 notice-flash" role="alert">
<button type="button" class="button-primary" data-bs-dismiss="alert" aria-label="Close">close</button>
<% if notice %>
<div class="alert alert-info alert-dismissible fade show m-1 notice-flash" role="alert">
<button type="button" class="button-alert" data-bs-dismiss="alert" aria-label="Close">close</button>
<%= notice %>
<%# </div>
</div>
<% end %>
<%# <% if alert %>
<%# <div class="alert alert-warning alert-dismissible fade show m-1" role="alert">
<% if alert %>
<div class="alert alert-warning alert-dismissible fade show m-1" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">CLOSE</button>
<%= alert %>
<%# </div>
</div>
<% end %>

0 comments on commit e95d9d1

Please sign in to comment.