feat: style buttons vertically

This commit is contained in:
karishmas6
2024-08-21 22:22:16 +05:30
parent abf00d6181
commit 27207cf9f0

View File

@@ -234,23 +234,31 @@ export const BrowserWindow = () => {
return ( return (
<div onClick={handleClick}> <div onClick={handleClick}>
{ {
getText === true || getList === true ? ( getText === true || getList === true ? (
<GenericModal <GenericModal
isOpen={showAttributeModal} isOpen={showAttributeModal}
onClose={() => { }} onClose={() => { }}
canBeClosed={false} canBeClosed={false}
> >
<div> <div>
<h2>Select Attribute</h2> <h2>Select Attribute</h2>
{attributeOptions.map((option) => ( <div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
<Button variant="outlined" size="medium" key={option.value} onClick={() => handleAttributeSelection(option.value)}> {attributeOptions.map((option) => (
{option.label} <Button
</Button> variant="outlined"
))} size="medium"
</div> key={option.value}
</GenericModal> onClick={() => handleAttributeSelection(option.value)}
) : null >
} {option.label}
</Button>
))}
</div>
</div>
</GenericModal>
) : null
}
{((getText === true || getList === true) && !showAttributeModal && highlighterData?.rect != null && highlighterData?.rect.top != null) && canvasRef?.current ? {((getText === true || getList === true) && !showAttributeModal && highlighterData?.rect != null && highlighterData?.rect.top != null) && canvasRef?.current ?
<Highlighter <Highlighter
unmodifiedRect={highlighterData?.rect} unmodifiedRect={highlighterData?.rect}