Skip to content

Commit

Permalink
resolve feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SemenStruchev committed Sep 23, 2024
1 parent 475cb2c commit dd9056c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions src/components/DatePicker/Day.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ import { Dot } from "../Dot/Dot";
export const Day = ({ selectedDate, date, getContent, currentMonth, isLoading = true, disabled = false }) => {
const isSameMonth = dayjs(currentMonth).isSame(date, "month");

if (getContent && isSameMonth) {
if (isLoading) {
return (
<div class="mr-2 flex animate-pulse items-center justify-center">

Check failure on line 13 in src/components/DatePicker/Day.jsx

View workflow job for this annotation

GitHub Actions / View Lint Report

src/components/DatePicker/Day.jsx#L13

[react/no-unknown-property] Unknown property 'class' found, use 'className' instead
<Dot className="ui-day-content pointer-events-none !cursor-not-allowed" color="secondary" />
</div>
);
}

return <DayContent selectedDate={selectedDate} date={date} getContent={getContent} />;
}

if (isLoading) {
return (
<div class="mr-2 flex animate-pulse items-center justify-center">

Check failure on line 24 in src/components/DatePicker/Day.jsx

View workflow job for this annotation

GitHub Actions / View Lint Report

src/components/DatePicker/Day.jsx#L24

[react/no-unknown-property] Unknown property 'class' found, use 'className' instead
Expand All @@ -15,10 +27,6 @@ export const Day = ({ selectedDate, date, getContent, currentMonth, isLoading =
);
}

if (getContent && isSameMonth) {
return <DayContent selectedDate={selectedDate} date={date} getContent={getContent} />;
}

const isSameDay = selectedDate && dayjs(selectedDate).isSame(date, "day");

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dot/Dot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const sizes = {
small: "h-1 w-1",
medium: "h-1.5 w-1.5",
large: "h-2 w-2",
["extra-large"]: "h-6 w-6",
["extra-large"]: "h-8 w-8",

Check failure on line 18 in src/components/Dot/Dot.jsx

View workflow job for this annotation

GitHub Actions / View Lint Report

src/components/Dot/Dot.jsx#L18

[no-useless-computed-key] Unnecessarily computed property ["extra-large"] found.
};

export const Dot = ({ color = "primary", size = "medium", className, ...rest }) => {
Expand Down

0 comments on commit dd9056c

Please sign in to comment.