File tree Expand file tree Collapse file tree 7 files changed +28
-5
lines changed Expand file tree Collapse file tree 7 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ export interface PickerSharedProps<DateType> {
46
46
// Render
47
47
suffixIcon ?: React . ReactNode ;
48
48
clearIcon ?: React . ReactNode ;
49
+ prevIcon ?: React . ReactNode ;
50
+ nextIcon ?: React . ReactNode ;
51
+ superPrevIcon ?: React . ReactNode ;
52
+ superNextIcon ?: React . ReactNode ;
49
53
getPopupContainer ?: ( node : HTMLElement ) => HTMLElement ;
50
54
51
55
// Events
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ export interface PanelSharedProps<DateType> {
68
68
locale : Locale ;
69
69
disabledDate ?: ( date : DateType ) => boolean ;
70
70
71
+ prevIcon ?: React . ReactNode ;
72
+ nextIcon ?: React . ReactNode ;
73
+ superPrevIcon ?: React . ReactNode ;
74
+ superNextIcon ?: React . ReactNode ;
75
+
71
76
/**
72
77
* Typescript can not handle generic type so we can not use `forwardRef` here.
73
78
* Thus, move ref into operationRef.
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ function DateHeader<DateType>(props: DateHeaderProps<DateType>) {
77
77
78
78
return (
79
79
< Header
80
+ { ...props }
80
81
prefixCls = { headerPrefixCls }
81
82
onSuperPrev = { onPrevYear }
82
83
onPrev = { onPrevMonth }
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ function DecadeHeader<DateType>(props: YearHeaderProps<DateType>) {
29
29
30
30
return (
31
31
< Header
32
+ { ...props }
32
33
prefixCls = { headerPrefixCls }
33
34
onSuperPrev = { onPrevDecades }
34
35
onSuperNext = { onNextDecades }
Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ import * as React from 'react';
2
2
3
3
export interface HeaderProps {
4
4
prefixCls : string ;
5
+
6
+ // Icons
7
+ prevIcon ?: React . ReactNode ;
8
+ nextIcon ?: React . ReactNode ;
9
+ superPrevIcon ?: React . ReactNode ;
10
+ superNextIcon ?: React . ReactNode ;
11
+
5
12
/** Last one step */
6
13
onPrev ?: ( ) => void ;
7
14
/** Next one step */
@@ -16,6 +23,10 @@ export interface HeaderProps {
16
23
17
24
function Header ( {
18
25
prefixCls,
26
+ prevIcon = '\u2039' ,
27
+ nextIcon = '\u203A' ,
28
+ superPrevIcon = '\u00AB' ,
29
+ superNextIcon = '\u00BB' ,
19
30
onSuperPrev,
20
31
onSuperNext,
21
32
onPrev,
@@ -31,7 +42,7 @@ function Header({
31
42
tabIndex = { - 1 }
32
43
className = { `${ prefixCls } -super-prev-btn` }
33
44
>
34
- { '\u00AB' }
45
+ { superPrevIcon }
35
46
</ button >
36
47
) }
37
48
{ onPrev && (
@@ -41,7 +52,7 @@ function Header({
41
52
tabIndex = { - 1 }
42
53
className = { `${ prefixCls } -prev-btn` }
43
54
>
44
- { '\u2039' }
55
+ { prevIcon }
45
56
</ button >
46
57
) }
47
58
< div className = { `${ prefixCls } -view` } > { children } </ div >
@@ -52,7 +63,7 @@ function Header({
52
63
tabIndex = { - 1 }
53
64
className = { `${ prefixCls } -next-btn` }
54
65
>
55
- { '\u203A' }
66
+ { nextIcon }
56
67
</ button >
57
68
) }
58
69
{ onSuperNext && (
@@ -62,7 +73,7 @@ function Header({
62
73
tabIndex = { - 1 }
63
74
className = { `${ prefixCls } -super-next-btn` }
64
75
>
65
- { '\u00BB' }
76
+ { superNextIcon }
66
77
</ button >
67
78
) }
68
79
</ div >
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export interface BodyOperationRef {
26
26
onUpDown : ( diff : number ) => void ;
27
27
}
28
28
29
- export interface TimeBodyProps < DateType > extends SharedTimeProps {
29
+ export interface TimeBodyProps < DateType > extends SharedTimeProps < DateType > {
30
30
prefixCls : string ;
31
31
locale : Locale ;
32
32
generateConfig : GenerateConfig < DateType > ;
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ function YearHeader<DateType>(props: YearHeaderProps<DateType>) {
32
32
33
33
return (
34
34
< Header
35
+ { ...props }
35
36
prefixCls = { headerPrefixCls }
36
37
onSuperPrev = { onPrevDecade }
37
38
onSuperNext = { onNextDecade }
You can’t perform that action at this time.
0 commit comments