2951-fix: Editing view filters button fix (#2954)

* 2951-fix: Editing view filters button fix

* Fixed lint

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Kanav Arora
2023-12-13 22:30:43 +05:30
committed by GitHub
parent 856b78abc7
commit 4673a302c7

View File

@ -16,6 +16,8 @@ import { useViewBar } from '@/views/hooks/useViewBar';
import { useViewScopedStates } from '../hooks/internal/useViewScopedStates'; import { useViewScopedStates } from '../hooks/internal/useViewScopedStates';
const StyledContainer = styled.div` const StyledContainer = styled.div`
background: ${({ theme }) => theme.color.blue};
border-radius: ${({ theme }) => theme.border.radius.md};
display: inline-flex; display: inline-flex;
margin-right: ${({ theme }) => theme.spacing(2)}; margin-right: ${({ theme }) => theme.spacing(2)};
position: relative; position: relative;
@ -53,29 +55,29 @@ export const UpdateViewButtonGroup = ({
} }
return ( return (
<DropdownScope dropdownScopeId={UpdateViewDropdownId}> <StyledContainer>
<Dropdown <ButtonGroup size="small" accent="blue">
dropdownHotkeyScope={hotkeyScope} <Button title="Update view" onClick={handleViewSubmit} />
clickableComponent={ <DropdownScope dropdownScopeId={UpdateViewDropdownId}>
<StyledContainer> <Dropdown
<ButtonGroup size="small" accent="blue"> dropdownHotkeyScope={hotkeyScope}
<Button title="Update view" onClick={handleViewSubmit} /> clickableComponent={
<Button size="small" Icon={IconChevronDown} /> <Button size="small" accent="blue" Icon={IconChevronDown} />
</ButtonGroup> }
</StyledContainer> dropdownComponents={
} <>
dropdownComponents={ <DropdownMenuItemsContainer>
<> <MenuItem
<DropdownMenuItemsContainer> onClick={handleCreateViewButtonClick}
<MenuItem LeftIcon={IconPlus}
onClick={handleCreateViewButtonClick} text="Create view"
LeftIcon={IconPlus} />
text="Create view" </DropdownMenuItemsContainer>
/> </>
</DropdownMenuItemsContainer> }
</> />
} </DropdownScope>
/> </ButtonGroup>
</DropdownScope> </StyledContainer>
); );
}; };