Use new exported components
This commit is contained in:
parent
f554798ee4
commit
a5d491256f
1 changed files with 28 additions and 19 deletions
|
@ -1,8 +1,10 @@
|
|||
import {
|
||||
Button,
|
||||
ButtonItem,
|
||||
definePlugin,
|
||||
Menu,
|
||||
MenuItem,
|
||||
PanelSection,
|
||||
PanelSectionRow,
|
||||
ServerAPI,
|
||||
showModal,
|
||||
staticClasses,
|
||||
|
@ -35,24 +37,31 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
|
|||
// };
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Button
|
||||
layout="below"
|
||||
onClick={(e) =>
|
||||
showModal(
|
||||
<Menu label="Menu" cancelText="CAAAANCEL" onCancel={() => {}}>
|
||||
<MenuItem onSelected={() => {}}>Item #1</MenuItem>
|
||||
<MenuItem onSelected={() => {}}>Item #2</MenuItem>
|
||||
<MenuItem onSelected={() => {}}>Item #3</MenuItem>
|
||||
</Menu>,
|
||||
e.currentTarget ?? window
|
||||
)
|
||||
}
|
||||
>
|
||||
Server says yolo
|
||||
</Button>
|
||||
<img src={logo} />
|
||||
</div>
|
||||
<PanelSection title="Panel Section">
|
||||
<PanelSectionRow>
|
||||
<ButtonItem
|
||||
layout="below"
|
||||
onClick={(e) =>
|
||||
showModal(
|
||||
<Menu label="Menu" cancelText="CAAAANCEL" onCancel={() => {}}>
|
||||
<MenuItem onSelected={() => {}}>Item #1</MenuItem>
|
||||
<MenuItem onSelected={() => {}}>Item #2</MenuItem>
|
||||
<MenuItem onSelected={() => {}}>Item #3</MenuItem>
|
||||
</Menu>,
|
||||
e.currentTarget ?? window
|
||||
)
|
||||
}
|
||||
>
|
||||
Server says yolo
|
||||
</ButtonItem>
|
||||
</PanelSectionRow>
|
||||
|
||||
<PanelSectionRow>
|
||||
<div style={{ display: "flex", justifyContent: "center" }}>
|
||||
<img src={logo} />
|
||||
</div>
|
||||
</PanelSectionRow>
|
||||
</PanelSection>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue