FIX;Calendar CustomDay props outside module root
This commit is contained in:
parent
0a8e8e38b5
commit
5e7e432a32
3 changed files with 8 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { CustomDayProps } from '../types';
|
import { CustomDayProps } from '@romanjaros/treejs-components/Calendar';
|
||||||
import { StyledCustomDayCell } from '../styles';
|
import { StyledCustomDayCell } from '../styles';
|
||||||
|
|
||||||
export const CustomDay: React.FC<CustomDayProps> = (props) => {
|
export const CustomDay: React.FC<CustomDayProps> = (props) => {
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
import moment from 'moment';
|
|
||||||
|
|
||||||
export type CustomDayProps = {
|
|
||||||
value: moment.Moment;
|
|
||||||
isToday: boolean;
|
|
||||||
isSelected: boolean;
|
|
||||||
onClick?: (event: any) => void;
|
|
||||||
};
|
|
|
@ -16,7 +16,6 @@ import {
|
||||||
StyledNavigationItemToday,
|
StyledNavigationItemToday,
|
||||||
} from './style';
|
} from './style';
|
||||||
import { isNilOrEmpty } from '@romanjaros/treejs-utils';
|
import { isNilOrEmpty } from '@romanjaros/treejs-utils';
|
||||||
import { CustomDayProps } from 'documentation/pages/CalendarPage/types';
|
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
hover?: boolean;
|
hover?: boolean;
|
||||||
|
@ -27,6 +26,13 @@ type IProps = {
|
||||||
CustomDay?: React.FunctionComponent<CustomDayProps>;
|
CustomDay?: React.FunctionComponent<CustomDayProps>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type CustomDayProps = {
|
||||||
|
value: moment.Moment;
|
||||||
|
isToday: boolean;
|
||||||
|
isSelected: boolean;
|
||||||
|
onClick?: (event: any) => void;
|
||||||
|
};
|
||||||
|
|
||||||
const todayMoment: Date = new Date();
|
const todayMoment: Date = new Date();
|
||||||
|
|
||||||
const Calendar: React.FC<IProps> = (props) => {
|
const Calendar: React.FC<IProps> = (props) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue