underline css fixed (#1570)

This commit is contained in:
devrk96 2020-11-05 11:27:27 +05:30 committed by GitHub
parent e14f23c31d
commit 06f106090b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View File

@ -241,6 +241,7 @@ export const EditableText = (props: EditableTextProps) => {
}
>
<TextContainer
className="editable-text-container"
data-cy={props.cypressSelector}
isInvalid={!!isInvalid}
isEditing={isEditing}

View File

@ -13,10 +13,13 @@ const Container = styled.div<{
savingState: SavingState;
isInvalid: boolean;
}>`
.editable-text-container {
justify-content: center;
}
&&& .${Classes.EDITABLE_TEXT}, .icon-wrapper {
padding: 5px 10px;
height: 25px;
text-decoration: ${props => (props.isEditing ? "unset" : "underline")};
background-color: ${props =>
(props.isInvalid && props.isEditing) ||
props.savingState === SavingState.ERROR
@ -24,6 +27,28 @@ const Container = styled.div<{
: "transparent"};
}
&&&& .${Classes.EDITABLE_TEXT} {
${props =>
!props.isEditing
? `
padding-left: 0px;
padding-right: 0px;
border-bottom-style: solid;
border-bottom-width: 1px;
width: fit-content;
`
: null}
}
&&&& .${Classes.EDITABLE_TEXT_CONTENT} {
${props =>
!props.isEditing
? `
min-width: 0px !important;
`
: null}
}
&&& .${Classes.EDITABLE_TEXT_CONTENT}, &&& .${Classes.EDITABLE_TEXT_INPUT} {
text-align: center;
color: #d4d4d4;