I understand that the line where the const isOpen
is a hook, but I need to change the value of openPanel
to true to open the panel. I'm new to react and fluentUI. It's probably something really obvious that I just don't realize at this stage.
export const FactionsMap = () =>{
const [isOpen, { setTrue: openPanel, setFalse: dismissPanel }] = useBoolean(false);
return(
<ThemeProvider applyTo='body' theme={myTheme}>
<TopBar/>
<Separator/>
<Stack horizontalAlign="center" styles={contentStackStyle}>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
<Row/>
</Stack>
<Panel headerText="Selected Tile" isBlocking={false} onDismiss={dismissPanel} closeButtonAriaLabel="Close">
<p id="panelContent"></p>
</Panel>
</ThemeProvider>
);
};
const onSquareClick = (event:any) => {
console.log(event.target.innerHTML);
const panelContent = document.getElementById("panelContent");
if(panelContent !== null)
{
panelContent.innerHTML = event.target.innerHTML;
}
}