Browse Source

feat: update size

pull/7734/head
DarkPhoenix2704 9 months ago
parent
commit
62ec989dc1
  1. 4
      packages/nc-gui/components/nc/DateWeekSelector.vue
  2. 4
      packages/nc-gui/components/nc/MonthYearSelector.vue

4
packages/nc-gui/components/nc/DateWeekSelector.vue

@ -220,6 +220,8 @@ const paginate = (action: 'next' | 'prev') => {
'bg-brand-50 border-1 !border-brand-500': isSelectedDate(date) && !isWeekPicker && isDayInPagedMonth(date), 'bg-brand-50 border-1 !border-brand-500': isSelectedDate(date) && !isWeekPicker && isDayInPagedMonth(date),
'hover:(border-1 border-gray-200 bg-gray-100)': !isSelectedDate(date) && !isWeekPicker, 'hover:(border-1 border-gray-200 bg-gray-100)': !isSelectedDate(date) && !isWeekPicker,
'nc-selected-week z-1': isDateInSelectedWeek(date) && isWeekPicker, 'nc-selected-week z-1': isDateInSelectedWeek(date) && isWeekPicker,
'border-none': isWeekPicker,
'border-transparent': !isWeekPicker,
'text-gray-400': !isDateInCurrentMonth(date), 'text-gray-400': !isDateInCurrentMonth(date),
'nc-selected-week-start': isSameDate(date, selectedWeek?.start), 'nc-selected-week-start': isSameDate(date, selectedWeek?.start),
'nc-selected-week-end': isSameDate(date, selectedWeek?.end), 'nc-selected-week-end': isSameDate(date, selectedWeek?.end),
@ -228,7 +230,7 @@ const paginate = (action: 'next' | 'prev') => {
'h-8 w-8': size === 'medium', 'h-8 w-8': size === 'medium',
'text-xs': size === 'small', 'text-xs': size === 'small',
}" }"
class="px-1 py-1 relative border-1 border-transparent font-large flex items-center cursor-pointer justify-center" class="px-1 py-1 relative border-1 font-large flex items-center cursor-pointer justify-center"
data-testid="nc-calendar-date" data-testid="nc-calendar-date"
@click="handleSelectDate(date)" @click="handleSelectDate(date)"
> >

4
packages/nc-gui/components/nc/MonthYearSelector.vue

@ -114,7 +114,7 @@ const compareYear = (date1: dayjs.Dayjs, date2: dayjs.Dayjs) => {
:class="{ :class="{
'!bg-brand-50 border-1 !border-brand-500': isMonthSelected(month), '!bg-brand-50 border-1 !border-brand-500': isMonthSelected(month),
}" }"
class="h-9 rounded-lg flex font-medium items-center justify-center hover:(border-1 border-gray-200 bg-gray-100) text-gray-500 cursor-pointer" class="h-9 rounded-lg flex font-medium items-center justify-center hover:(border-1 border-gray-200 bg-gray-100) text-gray-900 cursor-pointer"
@click="selectedDate = month" @click="selectedDate = month"
> >
{{ month.format('MMM') }} {{ month.format('MMM') }}
@ -127,7 +127,7 @@ const compareYear = (date1: dayjs.Dayjs, date2: dayjs.Dayjs) => {
:class="{ :class="{
'!bg-brand-50 !border-1 !border-brand-500': compareYear(year, selectedDate), '!bg-brand-50 !border-1 !border-brand-500': compareYear(year, selectedDate),
}" }"
class="h-9 rounded-lg flex font-medium items-center justify-center hover:(border-1 border-gray-200 bg-gray-100) text-gray-500 cursor-pointer" class="h-9 rounded-lg flex font-medium items-center justify-center hover:(border-1 border-gray-200 bg-gray-100) text-gray-900 cursor-pointer"
@click="selectedDate = year" @click="selectedDate = year"
> >
{{ year.format('YYYY') }} {{ year.format('YYYY') }}

Loading…
Cancel
Save