This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Mattermost Build <build@mattermost.com> Fixes mattermost/mattermost#20864
- Loading branch information
1 parent
5657bf1
commit faa4f3e
Showing
55 changed files
with
1,937 additions
and
41 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 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 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
34 changes: 34 additions & 0 deletions
34
components/info_toast/__snapshots__/info_toast.test.tsx.snap
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,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`components/InfoToast should match snapshot 1`] = ` | ||
<CSSTransition | ||
appear={true} | ||
classNames="toast" | ||
in={true} | ||
mountOnEnter={true} | ||
timeout={300} | ||
unmountOnExit={true} | ||
> | ||
<div | ||
className="info-toast className" | ||
> | ||
<CheckIcon /> | ||
<span> | ||
test | ||
</span> | ||
<button | ||
className="info-toast__undo" | ||
onClick={[Function]} | ||
> | ||
Undo | ||
</button> | ||
<ForwardRef | ||
className="info-toast__icon_button" | ||
icon="close" | ||
inverted={true} | ||
onClick={[Function]} | ||
size="sm" | ||
/> | ||
</div> | ||
</CSSTransition> | ||
`; |
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,65 @@ | ||
@charset 'UTF-8'; | ||
|
||
.info-toast { | ||
position: fixed; | ||
z-index: 99; | ||
right: 16px; | ||
bottom: 16px; | ||
display: grid; | ||
width: fit-content; | ||
min-height: 40px; | ||
align-items: center; | ||
padding: 8px; | ||
background: var(--center-channel-text); | ||
border-radius: 4px; | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12); | ||
color: var(--sidebar-text); | ||
font-weight: 600; | ||
grid-template-columns: min-content auto min-content auto; | ||
line-height: 20px; | ||
|
||
.info-toast__icon_button { | ||
color: inherit; | ||
} | ||
|
||
span { | ||
padding-left: 4px; | ||
} | ||
|
||
> div { | ||
display: flex; | ||
align-items: center; | ||
|
||
.Icon { | ||
font-size: 16px; | ||
} | ||
} | ||
} | ||
|
||
.info-toast__undo { | ||
display: flex; | ||
height: 24px; | ||
align-items: center; | ||
padding: 6px 10px; | ||
border: none; | ||
margin-right: 16px; | ||
margin-left: 8px; | ||
background: var(--button-bg); | ||
border-radius: 4px; | ||
color: var(--sidebar-text); | ||
font-size: 11px; | ||
font-weight: 600; | ||
line-height: 10px; | ||
} | ||
|
||
// Animations | ||
.toast-appear { | ||
opacity: 0; | ||
transform: translateY(150px); | ||
} | ||
|
||
.toast-appear-active { | ||
opacity: 1; | ||
transform: translateY(0); | ||
transition: all 500ms ease; | ||
} |
Oops, something went wrong.