@pingux/astro 1.15.0-alpha.4 → 1.15.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
18
18
|
|
19
19
|
var _index = require("../index");
|
20
20
|
|
21
|
+
var _useModalState = _interopRequireDefault(require("../hooks/useModalState"));
|
22
|
+
|
21
23
|
var _react2 = require("@emotion/react");
|
22
24
|
|
23
25
|
var _default = {
|
@@ -648,8 +650,13 @@ var buttons = [{
|
|
648
650
|
}];
|
649
651
|
|
650
652
|
var Default = function Default() {
|
651
|
-
|
652
|
-
|
653
|
+
var state = (0, _useModalState["default"])();
|
654
|
+
return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
|
655
|
+
onPress: state.open,
|
656
|
+
"aria-label": "Open modal"
|
657
|
+
}, "Open Modal"), state.isOpen && (0, _react2.jsx)(_index.Modal, {
|
658
|
+
isOpen: state.isOpen,
|
659
|
+
onClose: state.close,
|
653
660
|
hasCloseButton: true,
|
654
661
|
contentProps: {
|
655
662
|
maxWidth: '880px',
|
@@ -2,6 +2,7 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
|
|
2
2
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
3
3
|
import React from 'react';
|
4
4
|
import { Box, Button, HelpHint, Icon, Modal, OverlayProvider, Text } from '../index';
|
5
|
+
import useModalState from '../hooks/useModalState';
|
5
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
7
|
export default {
|
7
8
|
title: 'Recipes/TrialExperienceButtons'
|
@@ -629,8 +630,13 @@ var buttons = [{
|
|
629
630
|
icon: hotelSVG
|
630
631
|
}];
|
631
632
|
export var Default = function Default() {
|
632
|
-
|
633
|
-
|
633
|
+
var state = useModalState();
|
634
|
+
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
635
|
+
onPress: state.open,
|
636
|
+
"aria-label": "Open modal"
|
637
|
+
}, "Open Modal"), state.isOpen && ___EmotionJSX(Modal, {
|
638
|
+
isOpen: state.isOpen,
|
639
|
+
onClose: state.close,
|
634
640
|
hasCloseButton: true,
|
635
641
|
contentProps: {
|
636
642
|
maxWidth: '880px',
|