Skip to content

Commit b598185

Browse files
Deploying to gh-pages from @ 32dd0b8 🚀
1 parent a86bf97 commit b598185

1,324 files changed

Lines changed: 47208 additions & 47208 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

nightly/assets/Achievement-B7Sz9IgB.js

Lines changed: 102 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nightly/assets/Achievement-DWdPU0l2.js

Lines changed: 0 additions & 102 deletions
This file was deleted.

nightly/assets/ActionSheet-B4V5O9YR.js

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import{j as n}from"./iframe-DDwr9UO6.js";import{useMDXComponents as s}from"./index-CQ-nOjPT.js";import{M as p,C as c}from"./blocks-4n5he8k4.js";import"./Tag-85Xc8Sa5.js";import"./index-Vbr96S-1.js";import{C as a}from"./ControlsWithNote-CTPoaHsJ.js";import{D as m}from"./DocsHeader-xfAYqkZy.js";import{F as h}from"./Footer-DJ4mPzj6.js";import"./CommandsAndQueries-CW-He0gJ.js";import"./PageNotFound-4kcWV7p6.js";import{C as o,D as r}from"./ActionSheet.stories-Cs7T9xsV.js";import"./preload-helper-PPVm8Dsz.js";import"./information-B0DjFwsh.js";import"./sys-enter-2-CHn1eYD9.js";import"./alert-t6gJkZ57.js";import"./index-CwOzyR0V.js";import"./index-BmgPGln0.js";import"./Link-ioSKjh9y.js";import"./copy-guW5jyX6.js";import"./copy-DiJyffUH.js";import"./GitHub-Mark-0mGchQyo.js";import"./TableOfContent-DjWz_Doe.js";import"./index-DJm0resn.js";import"./index-BubbpkEs.js";import"./index-BlO2ebQP.js";import"./index-DBFNlRvR.js";import"./index-DlsPhuqx.js";import"./AvatarSize-BtKTMFJ5.js";import"./employee-B4AOINVU.js";import"./addCustomCSSWithScoping-BY1iD3uW.js";import"./Illustrations-CKFjYZ6M.js";import"./i18n-defaults-CFWtSmu6.js";import"./delete-CnbCzWbj.js";import"./utils-DxckeIWg.js";function i(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",...s(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(p,{of:o}),`
2+
`,n.jsx(m,{of:o,subComponents:["Button"]}),`
3+
`,n.jsx("br",{}),`
4+
`,n.jsx(e.h2,{id:"example",children:"Example"}),`
5+
`,n.jsx(c,{of:r}),`
6+
`,n.jsx(e.h2,{id:"properties",children:"Properties"}),`
7+
`,n.jsx(a,{of:r}),`
8+
`,n.jsx(e.h2,{id:"opening-actionsheets",children:"Opening ActionSheets"}),`
9+
`,n.jsx("br",{}),`
10+
`,n.jsxs(e.p,{children:["You can open and close the ",n.jsx(e.code,{children:"ActionSheet"})," component in a declarative way using the ",n.jsx(e.code,{children:"open"})," and ",n.jsx(e.code,{children:"opener"})," prop."]}),`
11+
`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`const MyComponentWithActionSheet = () => {
12+
const [actionSheetIsOpen, setActionSheetIsOpen] = useState(false);
13+
return (
14+
<>
15+
<Button
16+
id={'openActionSheetBtn'}
17+
onClick={() => {
18+
setActionSheetIsOpen(true);
19+
}}
20+
>
21+
Open Action Sheet
22+
</Button>
23+
<ActionSheet
24+
opener={'openActionSheetBtn'}
25+
open={actionSheetIsOpen}
26+
onClose={() => {
27+
setActionSheetIsOpen(false);
28+
}}
29+
/>
30+
</>
31+
);
32+
};
33+
`})}),`
34+
`,n.jsx(e.p,{children:n.jsxs(e.strong,{children:["Opening an ",n.jsx(e.code,{children:"ActionSheet"})," by reference"]})}),`
35+
`,n.jsxs(e.p,{children:["The ",n.jsx(e.code,{children:"ActionSheet"})," exposes a way to pass a reference of an element instead of an ",n.jsx(e.code,{children:"id"})," to the ",n.jsx(e.code,{children:"opener"}),` prop.
36+
You can do that by e.g. leveraging a React Ref.`]}),`
37+
`,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-jsx",children:`const ActionSheetComponent = () => {
38+
const buttonRef = useRef(null);
39+
const [open, setOpen] = useState(false);
40+
const handleOpenerClick = (e) => {
41+
setOpen((prev) => !prev);
42+
};
43+
return (
44+
<>
45+
<Button ref={buttonRef} onClick={handleOpenerClick}>
46+
Opener
47+
</Button>
48+
<ActionSheet opener={buttonRef.current} open={open}>
49+
{/* Content */}
50+
</ActionSheet>
51+
</>
52+
);
53+
};
54+
`})}),`
55+
`,n.jsx(h,{})]})}function G(t={}){const{wrapper:e}={...s(),...t.components};return e?n.jsx(e,{...t,children:n.jsx(i,{...t})}):i(t)}export{G as default};

0 commit comments

Comments
 (0)