Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
'use client';
|
|
|
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
import { getTranslation } from '@payloadcms/translations';
|
|
import React from 'react';
|
|
import { components as SelectComponents } from 'react-select';
|
|
import { useTranslation } from '../../../providers/Translation/index.js';
|
|
import './index.scss';
|
|
const baseClass = 'multi-value-label';
|
|
export const MultiValueLabel = props => {
|
|
const {
|
|
data,
|
|
selectProps: t0
|
|
} = props;
|
|
const {
|
|
customProps: t1
|
|
} = t0 === undefined ? {} : t0;
|
|
const {
|
|
draggableProps,
|
|
editableProps
|
|
} = t1 === undefined ? {} : t1;
|
|
const {
|
|
i18n
|
|
} = useTranslation();
|
|
const className = `${baseClass}__text`;
|
|
const labelText = data.label ? getTranslation(data.label, i18n) : "";
|
|
const titleText = typeof labelText === "string" ? labelText : "";
|
|
return _jsx("div", {
|
|
className: baseClass,
|
|
title: titleText,
|
|
children: _jsx(SelectComponents.MultiValueLabel, {
|
|
...props,
|
|
innerProps: {
|
|
className,
|
|
...(editableProps && editableProps(data, className, props.selectProps) || {}),
|
|
...(draggableProps || {})
|
|
}
|
|
})
|
|
});
|
|
};
|
|
//# sourceMappingURL=index.js.map |