-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from fortanix/feature/update-toast-design
Update toast design
- Loading branch information
Showing
9 changed files
with
452 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* Copyright (c) Fortanix, Inc. | ||
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of | ||
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
@use '../../../styling/defs.scss' as bk; | ||
|
||
@layer baklava.components { | ||
.bk-toast { | ||
width: auto !important; // Override style for .Toastify__toast-container | ||
padding: 0 !important; // Override style for .Toastify__toast-container | ||
width: 400px !important; // Override style for .Toastify__toast-container | ||
|
||
&:has(.bk-close--dark) { | ||
.bk-toast__body { | ||
margin-right: bk.$spacing-4 !important; // Override style for .Toastify__toast-body | ||
} | ||
} | ||
|
||
.bk-toast--success, | ||
.bk-toast--info, | ||
.bk-toast--error { | ||
min-height: 54px !important; // Override style for .Toastify__toast | ||
padding: bk.$spacing-4 !important; // Override style for .Toastify__toast | ||
border: 1px solid transparent; | ||
border-left: 4px solid transparent; | ||
} | ||
|
||
.bk-toast--success { | ||
border-color: #{bk.$theme-notification-success-border-default}; | ||
// Override style for .Toastify__toast-theme--light | ||
background-color: #{bk.$theme-notification-success-background-default} !important; | ||
} | ||
|
||
.bk-toast--info { | ||
border-color: #{bk.$theme-notification-informational-border-default}; | ||
// Override style for .Toastify__toast-theme--light | ||
background-color: #{bk.$theme-notification-informational-background-default} !important; | ||
} | ||
|
||
.bk-toast--error { | ||
border-color: #{bk.$theme-notification-alert-border-default}; | ||
// Override style for .Toastify__toast-theme--light | ||
background-color: #{bk.$theme-notification-alert-background-default} !important; | ||
} | ||
|
||
.bk-toast__icon--success, | ||
.bk-toast__icon--info, | ||
.bk-toast__icon--error { | ||
font-size: 18px; | ||
} | ||
|
||
.bk-toast__icon--success { | ||
color: #{bk.$theme-notification-success-border-default}; | ||
} | ||
|
||
.bk-toast__icon--info { | ||
color: #{bk.$theme-notification-informational-border-default}; | ||
} | ||
|
||
.bk-toast__icon--error { | ||
color: #{bk.$theme-notification-alert-border-default}; | ||
} | ||
|
||
.bk-close--dark { | ||
position: absolute; | ||
top: bk.$spacing-4; | ||
right: bk.$spacing-4; | ||
color: #{bk.$theme-notification-icon-default}; | ||
cursor: pointer; | ||
} | ||
|
||
.bk-toast__body { | ||
margin: 0 !important; // Override style for .Toastify__toast-body | ||
padding: 0 !important; // Override style for .Toastify__toast-body | ||
align-items: flex-start !important; // Override style for .Toastify__toast-body | ||
color: bk.$theme-notification-text-default; | ||
@include bk.font(bk.$font-family-body); | ||
font-size: 14px; | ||
} | ||
|
||
.bk-toast__message { | ||
display: flex; | ||
flex-direction: column; | ||
gap: bk.$spacing-1; | ||
} | ||
|
||
.bk-toast__message__title { | ||
font-weight: bk.$font-weight-semibold; | ||
} | ||
|
||
.bk-toast__actions { | ||
display: flex; | ||
align-items: center; | ||
gap: bk.$spacing-3; | ||
margin-top: bk.$spacing-3; | ||
} | ||
|
||
.bk-toast__copy-icon { | ||
padding: 0; | ||
color: bk.$theme-notification-text-link; | ||
} | ||
|
||
.bk-toast__progress-bar--success, | ||
.bk-toast__progress-bar--info, | ||
.bk-toast__progress-bar--error { | ||
margin-top: bk.$spacing-3; | ||
opacity: 1 !important; // Override style for .Toastify__progress-bar | ||
background-color: #{bk.$theme-progress-bar-fill} !important; // Override style for .Toastify__progress-bar | ||
} | ||
|
||
.bk-toast__button, | ||
.bk-toast__copy-button { | ||
padding: 0; | ||
color: bk.$theme-notification-text-link; | ||
font-size: 12px; | ||
font-weight: bk.$font-weight-semibold; | ||
} | ||
|
||
.bk-toast__link { | ||
font-weight: bk.$font-weight-semibold; | ||
} | ||
} | ||
} |
Oops, something went wrong.