fix: width is added for the max content (#2292)

This commit is contained in:
palashgdev 2023-02-20 17:28:38 +05:30 committed by GitHub
parent c657f96032
commit 3d5134b43c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ export const SpanLine = styled.div<Props>`
top: 50%; top: 50%;
position: absolute; position: absolute;
`; `;
export const SpanBorder = styled.div<Props>` export const SpanBorder = styled.div<Props>`
background: ${({ bgColor }): string => bgColor}; background: ${({ bgColor }): string => bgColor};
border-radius: 5px; border-radius: 5px;
@ -34,27 +35,18 @@ export const SpanWrapper = styled.div`
position: relative; position: relative;
z-index: 2; z-index: 2;
min-height: 2rem; min-height: 2rem;
/* &:before {
display: inline-block;
content: '';
border-bottom: 1px solid #303030;
position: absolute;
left: -30px;
width: 30px;
z-index: 0;
} */
`; `;
interface SpanTextProps extends Pick<Props, 'leftOffset'> { interface SpanTextProps extends Pick<Props, 'leftOffset'> {
isDarkMode: boolean; isDarkMode: boolean;
} }
export const SpanText = styled(Typography)<SpanTextProps>` export const SpanText = styled(Typography.Paragraph)<SpanTextProps>`
&&& { &&& {
left: ${({ leftOffset }): string => `${leftOffset}%`}; left: ${({ leftOffset }): string => `${leftOffset}%`};
top: 65%; top: 65%;
position: absolute; position: absolute;
color: ${({ isDarkMode }): string => (isDarkMode ? '##ACACAC' : '#666')}; width: max-content;
color: ${({ isDarkMode }): string => (isDarkMode ? '#ACACAC' : '#666')};
font-size: 0.75rem; font-size: 0.75rem;
} }
`; `;