RTL (right-to-left) layout (#1654)

* added rtl to body

* added locale checkker in _document.tsx to check for ar or he locale

* added rtl modifiers for event-types

* added rtl classes

* wip

* wip

Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
Peer RichelsenandBailey Pumfleet authored and GitHub committed 2022-02-01 22:17:37 +00:00
1 parent d9bb8aacfc
commit 8bb3e9c0be
57 files changed
+203 -164

No files matched your search

+7 -2
View File
@@ -141,7 +141,12 @@ export default function CreateEventTypeButton(props: Props) {
key={option.slug}
className="px-3 py-2 cursor-pointer hover:bg-neutral-100 focus:outline-none"
onSelect={() => openModal(option)}>
<Avatar alt={option.name || ""} imageSrc={option.image} size={6} className="inline mr-2" />
<Avatar
alt={option.name || ""}
imageSrc={option.image}
size={6}
className="inline ltr:mr-2 rtl:ml-2"
/>
{option.name ? option.name : option.slug}
</DropdownMenuItem>
))}
@@ -222,7 +227,7 @@ export default function CreateEventTypeButton(props: Props) {
<RadioArea.Group
{...register("schedulingType")}
onChange={(val) => form.setValue("schedulingType", val as SchedulingType)}
className="relative flex mt-1 space-x-6 rounded-sm shadow-sm">
className="relative flex mt-1 rtl:space-x-reverse space-x-6 rounded-sm shadow-sm">
<RadioArea.Item value={SchedulingType.COLLECTIVE} className="w-1/2 text-sm">
<strong className="block mb-1">{t("collective")}</strong>
<p>{t("collective_description")}</p>
@@ -37,7 +37,7 @@ export const EventTypeDescription = ({ eventType, className }: EventTypeDescript
{eventType.description.length > 100 && "..."}
</h2>
)}
<ul className="flex mt-2 space-x-4 ">
<ul className="flex mt-2 rtl:space-x-reverse space-x-4 ">
<li className="flex whitespace-nowrap">
<ClockIcon className="inline mt-0.5 mr-1.5 h-4 w-4 text-neutral-400" aria-hidden="true" />
{eventType.length}m