adjust css for toast message so that it behaves as expected (text truncation via ellipsis) (#7213)
This commit is contained in:
parent
d6e14b84db
commit
905a52ea61
2 changed files with 8 additions and 5 deletions
|
@ -7,7 +7,7 @@ import Icon from 'component/common/icon';
|
||||||
import LbcMessage from 'component/common/lbc-message';
|
import LbcMessage from 'component/common/lbc-message';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
removeSnack: any => void,
|
removeSnack: (any) => void,
|
||||||
snack: ?{
|
snack: ?{
|
||||||
linkTarget: ?string,
|
linkTarget: ?string,
|
||||||
linkText: ?string,
|
linkText: ?string,
|
||||||
|
@ -53,9 +53,9 @@ class SnackBar extends React.PureComponent<Props> {
|
||||||
<div className="snack-bar__message">
|
<div className="snack-bar__message">
|
||||||
<Icon icon={isError ? ICONS.ALERT : ICONS.COMPLETED} size={18} />
|
<Icon icon={isError ? ICONS.ALERT : ICONS.COMPLETED} size={18} />
|
||||||
|
|
||||||
<div>
|
<p className="snack-bar__messageText">
|
||||||
<LbcMessage>{message}</LbcMessage>
|
<LbcMessage>{message}</LbcMessage>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{linkText && linkTarget && (
|
{linkText && linkTarget && (
|
||||||
// This is a little weird because of `linkTarget` code in `lbry-redux`
|
// This is a little weird because of `linkTarget` code in `lbry-redux`
|
||||||
|
|
|
@ -47,8 +47,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.snack-bar__message {
|
.snack-bar__message {
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
@ -64,3 +62,8 @@
|
||||||
min-width: 1rem;
|
min-width: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.snack-bar__messageText {
|
||||||
|
min-width: 0;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue