Skip to content

Commit 64e0785

Browse files
Merge branch 'master' into pr/3086
2 parents d28645a + 6a68e67 commit 64e0785

File tree

13 files changed

+400
-1017
lines changed

13 files changed

+400
-1017
lines changed

docs-site/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"highlight.js": "^11.0.1",
6+
"highlight.js": "^11.2.0",
77
"react": "^17.0.2",
88
"react-app-rewired": "^2.1.8",
99
"react-dom": "^17.0.2",
10-
"react-live": "^2.2.3",
10+
"react-live": "^2.3.0",
1111
"react-scripts": "4.0.3"
1212
},
1313
"scripts": {
@@ -32,7 +32,7 @@
3232
]
3333
},
3434
"devDependencies": {
35-
"node-sass": "^5.0.0",
35+
"sass": "^1.37.5",
3636
"raw-loader": "^4.0.2"
3737
}
3838
}

docs-site/src/components/Examples/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import OnBlurCallbacks from "../../examples/onBlurCallbacks";
4343
import ConfigurePopper from "../../examples/configurePopper";
4444
import Portal from "../../examples/portal";
4545
import PortalById from "../../examples/portalById";
46+
import WithPortalById from "../../examples/withPortalById";
4647
import TabIndex from "../../examples/tabIndex";
4748
import YearDropdown from "../../examples/yearDropdown";
4849
import YearItemNumber from "../../examples/yearItemNumber";
@@ -51,6 +52,7 @@ import MonthDropdownShort from "../../examples/monthDropdownShort";
5152
import MonthYearDropdown from "../../examples/monthYearDropdown";
5253
import YearSelectDropdown from "../../examples/yearSelectDropdown";
5354
import Inline from "../../examples/inline";
55+
import InlineVisible from "../../examples/inlineVisible";
5456
import OpenToDate from "../../examples/openToDate";
5557
import FixedCalendar from "../../examples/fixedCalendar";
5658
import WeekNumbers from "../../examples/weekNumbers";
@@ -262,8 +264,8 @@ export default class exampleComponents extends React.Component {
262264
component: Inline,
263265
},
264266
{
265-
title: "Inline portal version",
266-
component: Inline,
267+
title: "Button to show Inline version",
268+
component: InlineVisible,
267269
},
268270
{
269271
title: "Input time",
@@ -355,6 +357,12 @@ export default class exampleComponents extends React.Component {
355357
"If the provided portalId cannot be found in the dom, one will be created by default with that id.",
356358
component: PortalById,
357359
},
360+
{
361+
title: "Portal version with portal by id",
362+
description:
363+
"If the provided portalId cannot be found in the dom, one will be created by default with that id.",
364+
component: WithPortalById,
365+
},
358366
{
359367
title: "Quarter Picker",
360368
component: QuarterPicker,

docs-site/src/examples/inlinePortal.js renamed to docs-site/src/examples/inlineVisible.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const [isOpen, setIsOpen] = useState(false);
44
const handleChange = (e) => {
55
setIsOpen(!isOpen);
6+
setStartDate(e);
67
};
78
const handleClick = (e) => {
89
e.preventDefault();
@@ -14,12 +15,7 @@
1415
{format(startDate, "dd-MM-yyyy")}
1516
</button>
1617
{isOpen && (
17-
<DatePicker
18-
selected={startDate}
19-
onChange={handleChange}
20-
withPortal
21-
inline
22-
/>
18+
<DatePicker selected={startDate} onChange={handleChange} inline />
2319
)}
2420
</>
2521
);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
() => {
2+
const [startDate, setStartDate] = useState(new Date());
3+
return (
4+
<DatePicker
5+
selected={startDate}
6+
onChange={(date) => setStartDate(date)}
7+
withPortal
8+
portalId="root-portal"
9+
/>
10+
);
11+
};

0 commit comments

Comments
 (0)