Fix displaying properties on kanban cards: (#1400)

- hide URL property only when it is empty
  - hide empty labels for Select/MultiSelect properties
This commit is contained in:
kamre 2021-10-04 11:35:39 +07:00 committed by GitHub
parent edc89e04ce
commit 1a747b780e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

View file

@ -41,13 +41,15 @@
}
.octo-propertyvalue {
margin: 4px 0 0;
font-size: 12px;
line-height: 18px;
&:empty {
input[value=''] {
display: none;
}
.Label.empty {
display: block;
padding: 0;
margin: 0;
}
}
.octo-icontitle {

View file

@ -21,7 +21,8 @@ type Props = {
const URLProperty = (props: Props): JSX.Element => {
let link: ReactNode = null
if (props.value?.trim()) {
const hasValue = Boolean(props.value?.trim())
if (hasValue) {
link = (
<a
className='Link__button'
@ -37,6 +38,7 @@ const URLProperty = (props: Props): JSX.Element => {
return (
<div className='URLProperty property-link url'>
{(hasValue || props.placeholder) &&
<Editable
className='octo-propertyvalue'
placeholderText={props.placeholder}
@ -47,7 +49,7 @@ const URLProperty = (props: Props): JSX.Element => {
onSave={props.onSave}
onCancel={props.onCancel}
validator={props.validator}
/>
/>}
{link}
</div>
)

View file

@ -14,7 +14,7 @@
&.empty {
color: rgba(var(--center-channel-color-rgb), 0.4);
padding: 3px;
padding: 1px;
text-transform: none;
font-weight: normal;
}