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,16 +55,14 @@ export const UpdateViewButtonGroup = ({
} }
return ( return (
<StyledContainer>
<ButtonGroup size="small" accent="blue">
<Button title="Update view" onClick={handleViewSubmit} />
<DropdownScope dropdownScopeId={UpdateViewDropdownId}> <DropdownScope dropdownScopeId={UpdateViewDropdownId}>
<Dropdown <Dropdown
dropdownHotkeyScope={hotkeyScope} dropdownHotkeyScope={hotkeyScope}
clickableComponent={ clickableComponent={
<StyledContainer> <Button size="small" accent="blue" Icon={IconChevronDown} />
<ButtonGroup size="small" accent="blue">
<Button title="Update view" onClick={handleViewSubmit} />
<Button size="small" Icon={IconChevronDown} />
</ButtonGroup>
</StyledContainer>
} }
dropdownComponents={ dropdownComponents={
<> <>
@ -77,5 +77,7 @@ export const UpdateViewButtonGroup = ({
} }
/> />
</DropdownScope> </DropdownScope>
</ButtonGroup>
</StyledContainer>
); );
}; };