🎨 style(menuBar): refactor menu bar to improve readability and add new option

The menu bar has been refactored to improve readability and make it easier to add new options in the future. A new option has been added to create a new flow. The "Edit" label has been changed to "Options" to better reflect the purpose of the dropdown menu.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-16 16:10:54 -03:00
commit 46c998be33

View file

@ -64,7 +64,15 @@ export const MenuBar = ({ flows, tabId }) => {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-44">
<DropdownMenuLabel>Edit</DropdownMenuLabel>
<DropdownMenuLabel>Options</DropdownMenuLabel>
<DropdownMenuItem
onClick={() => {
handleAddFlow();
}}
>
<Plus className="w-4 h-4 mr-2" />
New
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => {
openPopUp(<FlowSettingsModal />);
@ -99,22 +107,20 @@ export const MenuBar = ({ flows, tabId }) => {
>
{flows.map((flow, idx) => {
return (
<Link to={"/flow/" + flow.id} className="flex w-full items-center">
<DropdownMenuRadioItem value={flow.id} className="flex-1 w-full inline-block truncate break-words mr-2">
<Link
to={"/flow/" + flow.id}
className="flex w-full items-center"
>
<DropdownMenuRadioItem
value={flow.id}
className="flex-1 w-full inline-block truncate break-words mr-2"
>
{flow.name}
</DropdownMenuRadioItem>
</Link>
);
})}
</DropdownMenuRadioGroup>
<DropdownMenuItem
onClick={() => {
handleAddFlow();
}}
>
<Plus className="w-4 h-4 mr-2" />
New Project
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>