mirror of https://github.com/acid-info/lsd.git
fix: rebase and update icon names
This commit is contained in:
parent
6fb89110b7
commit
c6d66876ad
|
@ -1,5 +1,4 @@
|
||||||
import { FirstDayOfWeek, useMonth } from '@datepicker-react/hooks'
|
import { FirstDayOfWeek, useMonth } from '@datepicker-react/hooks'
|
||||||
import { useState } from 'react'
|
|
||||||
import { useCalendarContext } from './Calendar.context'
|
import { useCalendarContext } from './Calendar.context'
|
||||||
import { Days, MonthHeader, WeekdayHeader } from './MonthHelpers'
|
import { Days, MonthHeader, WeekdayHeader } from './MonthHelpers'
|
||||||
import { calendarClasses } from './Calendar.classes'
|
import { calendarClasses } from './Calendar.classes'
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
import { Day } from './Day'
|
import { Day } from './Day'
|
||||||
import { FC } from 'react'
|
import { FC } from 'react'
|
||||||
import { NavigateBeforeIcon, NavigateNextIcon } from '../Icons'
|
|
||||||
import { calendarClasses } from './Calendar.classes'
|
import { calendarClasses } from './Calendar.classes'
|
||||||
import { Typography } from '../Typography'
|
import { Typography } from '../Typography'
|
||||||
import { UseMonthResult } from '@datepicker-react/hooks'
|
import { UseMonthResult } from '@datepicker-react/hooks'
|
||||||
import { generateFullMonthDays } from '../../utils/date.utils'
|
import { generateFullMonthDays } from '../../utils/date.utils'
|
||||||
import { useCalendarContext } from './Calendar.context'
|
import { useCalendarContext } from './Calendar.context'
|
||||||
import { YearControl } from './YearControl'
|
import { YearControl } from './YearControl'
|
||||||
|
import { ChevronLeftIcon, ChevronRightIcon } from '../Icons'
|
||||||
|
|
||||||
type CalendarNavigationButtonProps = {
|
type CalendarNavigationButtonProps = {
|
||||||
direction: 'previous' | 'next'
|
direction: 'previous' | 'next'
|
||||||
|
@ -20,7 +20,7 @@ export const CalendarNavigationButton: FC<CalendarNavigationButtonProps> = ({
|
||||||
onClick,
|
onClick,
|
||||||
className,
|
className,
|
||||||
}) => {
|
}) => {
|
||||||
const Icon = direction === 'previous' ? NavigateBeforeIcon : NavigateNextIcon
|
const Icon = direction === 'previous' ? ChevronLeftIcon : ChevronRightIcon
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className={clsx(calendarClasses.button, className)}
|
className={clsx(calendarClasses.button, className)}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
import { FC, useEffect, useRef, useState } from 'react'
|
import { FC, useEffect, useRef, useState } from 'react'
|
||||||
import { ArrowDownIcon, ArrowUpIcon } from '../Icons'
|
|
||||||
import { calendarClasses } from './Calendar.classes'
|
import { calendarClasses } from './Calendar.classes'
|
||||||
import { Typography } from '../Typography'
|
import { Typography } from '../Typography'
|
||||||
import { useClickAway, useScroll } from 'react-use'
|
import { useClickAway, useScroll } from 'react-use'
|
||||||
import { useCalendarContext } from './Calendar.context'
|
import { useCalendarContext } from './Calendar.context'
|
||||||
import { CALENDAR_MAX_YEAR, CALENDAR_MIN_YEAR } from '.'
|
import { CALENDAR_MAX_YEAR, CALENDAR_MIN_YEAR } from '.'
|
||||||
|
import { ChevronDownIcon, ChevronUpIcon } from '../Icons'
|
||||||
|
|
||||||
type YearControlProps = {
|
type YearControlProps = {
|
||||||
year: string
|
year: string
|
||||||
|
@ -102,9 +102,9 @@ export const YearControl: FC<YearControlProps> = ({
|
||||||
|
|
||||||
<div className={calendarClasses.changeYearIconContainer}>
|
<div className={calendarClasses.changeYearIconContainer}>
|
||||||
{changeYearMode ? (
|
{changeYearMode ? (
|
||||||
<ArrowUpIcon color="primary" />
|
<ChevronUpIcon color="primary" />
|
||||||
) : (
|
) : (
|
||||||
<ArrowDownIcon color="primary" />
|
<ChevronDownIcon color="primary" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue