✨(react) render Button as link
For a variety of reasons, such as accessibility or integration with external react-router deps style we needed to be able to provide the ability to render the Button component as link in order to be able to provide link-specific attribute for rendering such as href.
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
isToday,
|
||||
} from "@internationalized/date";
|
||||
import { CalendarState, RangeCalendarState } from "@react-stately/calendar";
|
||||
import { Button } from ":/components/Button";
|
||||
import { Button, ButtonElement } from ":/components/Button";
|
||||
|
||||
interface CalendarCellProps {
|
||||
state: CalendarState | RangeCalendarState;
|
||||
@@ -20,7 +20,7 @@ const isRangeCalendar = (object: any): object is RangeCalendarState => {
|
||||
};
|
||||
|
||||
export const CalendarCell = ({ state, date }: CalendarCellProps) => {
|
||||
const ref = useRef<HTMLButtonElement>(null);
|
||||
const ref = useRef<ButtonElement>(null);
|
||||
const {
|
||||
cellProps,
|
||||
buttonProps,
|
||||
|
||||
Reference in New Issue
Block a user