Align text overflow styles for Label and Value (#39068) (#39092)

This commit is contained in:
Kerry Gallagher 2019-06-18 13:41:41 +01:00 committed by GitHub
parent a5cdac60de
commit 0237657568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,24 +170,23 @@ const ValueInner = euiStyled.button`
}
`;
const Value = euiStyled<ColorProps, 'div'>('div')`
font-weight: bold;
font-size: 0.9em;
const SquareTextContent = euiStyled<ColorProps, 'div'>('div')`
text-align: center;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1 0 auto;
line-height: 1.2em;
color: ${props => readableColor(props.color)};
`;
const Label = euiStyled<ColorProps, 'div'>('div')`
text-overflow: ellipsis;
const Value = euiStyled(SquareTextContent)`
font-weight: bold;
font-size: 0.9em;
line-height: 1.2em;
`;
const Label = euiStyled(SquareTextContent)`
font-size: 0.7em;
margin-bottom: 0.7em;
text-align: center;
width: 100%;
flex: 1 0 auto;
white-space: nowrap;
overflow: hidden;
color: ${props => readableColor(props.color)};
`;