1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

refactor: insights actions container relaxed width (#7603)

This commit is contained in:
Mateusz Kwasniewski 2024-07-16 17:27:11 +02:00 committed by GitHub
parent 7909f563d6
commit d2ef9e27ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -25,6 +25,14 @@ const StickyWrapper = styled(Box, {
transition: 'padding 0.3s ease',
}));
const StyledProjectSelect = styled(ProjectSelect)(({ theme }) => ({
flex: 1,
width: '300px',
[theme.breakpoints.down('sm')]: {
width: '100%',
},
}));
export const Insights: VFC = () => {
const [scrolled, setScrolled] = useState(false);
const { insights, loading, error } = useInsights();
@ -60,16 +68,11 @@ export const Insights: VFC = () => {
<StickyWrapper scrolled={scrolled}>
<InsightsHeader
actions={
<ProjectSelect
<StyledProjectSelect
selectedProjects={projects}
onChange={setProjects}
dataTestId={'DASHBOARD_PROJECT_SELECT'}
limitTags={1}
sx={{
flex: 1,
maxWidth: '360px',
width: '100%',
}}
/>
}
/>

View File

@ -33,7 +33,6 @@ const StyledActionButtons = styled('div')(({ theme }) => ({
const StyledExternalActionsContainer = styled('div')(({ theme }) => ({
display: 'flex',
gap: theme.spacing(1),
width: 300,
[theme.breakpoints.down('md')]: {
width: '100%',
},