Move hidden label to toggle on events page (#4320)

pull/4321/head^2
Noah 2022-09-09 00:26:51 +02:00 committed by GitHub
parent 293c2ffb86
commit 79fd1bd76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -72,11 +72,6 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou
<small
className="hidden font-normal leading-4 text-gray-600 sm:inline"
data-testid={"event-type-slug-" + type.id}>{`/${group.profile.slug}/${type.slug}`}</small>
{type.hidden && (
<span className="rtl:mr-2inline items-center rounded-sm bg-yellow-100 px-1.5 py-0.5 text-xs font-medium text-yellow-800 ltr:ml-2">
{t("hidden") as string}
</span>
)}
{readOnly && (
<span className="rtl:mr-2inline items-center rounded-sm bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 ltr:ml-2">
{t("readonly") as string}
@ -263,9 +258,14 @@ export const EventTypeList = ({ group, groupIndex, readOnly, types }: EventTypeL
)}
<div
className={classNames(
"flex justify-between space-x-2 rtl:space-x-reverse ",
"flex items-center justify-between space-x-2 rtl:space-x-reverse ",
type.$disabled && "pointer-events-none cursor-not-allowed"
)}>
{type.hidden && (
<Badge variant="gray" size="lg">
{t("hidden")}
</Badge>
)}
<Tooltip content={t("show_eventtype_on_profile") as string}>
<div className="self-center pr-2">
<Switch