Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RTL support #238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Calendar/Years.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useContext } from "react";
import { generateArrayNumber } from "../../helpers";
import { RoundedButton } from "../utils";

import DatepickerContext from "contexts/DatepickerContext";
import DatepickerContext from "../../contexts/DatepickerContext";

interface Props {
year: number;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ const Datepicker: React.FC<DatepickerType> = ({
<Input setContextRef={setInputRef} />

<div
className="transition-all ease-out duration-300 absolute z-10 mt-[1px] text-sm lg:text-xs 2xl:text-sm translate-y-4 opacity-0 hidden"
className="end-0 transition-all ease-out duration-300 absolute z-10 mt-[1px] text-sm lg:text-xs 2xl:text-sm translate-y-4 opacity-0 hidden"
ref={calendarContainerRef}
>
<Arrow ref={arrowRef} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const Input: React.FC<Props> = (e: Props) => {
}

const defaultToggleClassName =
"absolute right-0 h-full px-3 text-gray-400 focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed";
"absolute end-0 h-full px-3 text-gray-400 focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed";

return typeof toggleClassName === "function"
? toggleClassName(defaultToggleClassName)
Expand Down
2 changes: 1 addition & 1 deletion src/components/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const Arrow = React.forwardRef<HTMLDivElement, {}>((props, ref) => {
return (
<div
ref={ref}
className="absolute z-20 h-4 w-4 rotate-45 mt-0.5 ml-[1.2rem] border-l border-t border-gray-300 bg-white dark:bg-slate-800 dark:border-slate-600"
className="absolute end-0 z-20 h-4 w-4 rotate-45 mt-0.5 ml-[1.2rem] border-l border-t border-gray-300 bg-white dark:bg-slate-800 dark:border-slate-600"
/>
);
});
Expand Down