@@ -166,6 +157,7 @@ exports[`components/table/TableRow should match snapshot, display properties 1`]
>
@@ -348,6 +331,7 @@ exports[`components/table/TableRow should match snapshot, resizing column 1`] =
>
{children}
+export const wrapIntl = (children?: React.ReactNode): JSX.Element => {children}
export function mockDOM(): void {
window.focus = jest.fn()
diff --git a/webapp/src/widgets/label.scss b/webapp/src/widgets/label.scss
index 604f02f6d..fd97de044 100644
--- a/webapp/src/widgets/label.scss
+++ b/webapp/src/widgets/label.scss
@@ -2,6 +2,8 @@
display: inline-flex;
align-items: center;
padding: 2px 8px;
+ margin-right: 5px;
+ margin-bottom: 5px;
border-radius: 3px;
line-height: 20px;
color: rgba(var(--center-channel-color-rgb), 0.8);
@@ -9,8 +11,6 @@
text-transform: uppercase;
font-weight: 600;
font-size: 13px;
- margin-right: 5px;
- margin-bottom: 5px;
input {
line-height: 20px;
diff --git a/webapp/src/widgets/label.tsx b/webapp/src/widgets/label.tsx
index 5926bf25f..455c605d7 100644
--- a/webapp/src/widgets/label.tsx
+++ b/webapp/src/widgets/label.tsx
@@ -10,7 +10,7 @@ type Props = {
color?: string
title?: string
children: React.ReactNode
- classNames?: string
+ className?: string
}
// Switch is an on-off style switch / checkbox
@@ -21,7 +21,7 @@ function Label(props: Props): JSX.Element {
}
return (
{props.children}
diff --git a/webapp/src/widgets/valueSelector.scss b/webapp/src/widgets/valueSelector.scss
index 4d719bd0b..d610d5b3b 100644
--- a/webapp/src/widgets/valueSelector.scss
+++ b/webapp/src/widgets/valueSelector.scss
@@ -36,6 +36,10 @@
padding-bottom: 0;
}
+ .Label-no-margin {
+ margin: 0;
+ }
+
.Label-single-select {
margin-bottom: 0;
}
diff --git a/webapp/src/widgets/valueSelector.tsx b/webapp/src/widgets/valueSelector.tsx
index ff85b9b18..b5549ec6e 100644
--- a/webapp/src/widgets/valueSelector.tsx
+++ b/webapp/src/widgets/valueSelector.tsx
@@ -32,6 +32,7 @@ type Props = {
onDeleteOption: (option: IPropertyOption) => void
isMulti?: boolean
onDeleteValue?: (value: IPropertyOption) => void
+ onBlur?: () => void
}
type LabelProps = {
@@ -40,22 +41,26 @@ type LabelProps = {
onChangeColor: (option: IPropertyOption, color: string) => void
onDeleteOption: (option: IPropertyOption) => void
onDeleteValue?: (value: IPropertyOption) => void
+ isMulti?: boolean
}
const ValueSelectorLabel = React.memo((props: LabelProps): JSX.Element => {
- const {option, onDeleteValue, meta} = props
+ const {option, onDeleteValue, meta, isMulti} = props
const intl = useIntl()
if (meta.context === 'value') {
+ let className = onDeleteValue ? 'Label-no-padding' : 'Label-single-select'
+ if (!isMulti) {
+ className += ' Label-no-margin'
+ }
return (