1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00

chore: update view more templates button design (#10685)

https://linear.app/unleash/issue/2-3898/update-the-design-of-the-view-more-button

Updates the design of the "view more templates" button in the new "add
strategy" modal.

<img width="925" height="221" alt="image"
src="https://github.com/user-attachments/assets/2a790828-aac5-4c56-bbac-bcb254dc6049"
/>
This commit is contained in:
Nuno Góis 2025-09-24 12:02:26 +01:00 committed by GitHub
parent efdfb67c9f
commit 27af5cb0b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 16 deletions

View File

@ -21,9 +21,7 @@ const StyledCard = styled('div', {
})<{ isDefault?: boolean }>(({ theme, isDefault }) => ({ })<{ isDefault?: boolean }>(({ theme, isDefault }) => ({
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
width: '100%',
height: theme.spacing(10), height: theme.spacing(10),
maxWidth: '30rem',
padding: theme.spacing(2), padding: theme.spacing(2),
backgroundColor: theme.palette.background.elevation1, backgroundColor: theme.palette.background.elevation1,
color: 'inherit', color: 'inherit',

View File

@ -74,12 +74,15 @@ const StyledNoTemplatesDescription = styled('p')(({ theme }) => ({
color: theme.palette.text.secondary, color: theme.palette.text.secondary,
})); }));
const StyledViewAllTemplates = styled(Box)({ const StyledViewMoreButton = styled(Button)(({ theme }) => ({
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
height: '100%', height: theme.spacing(10),
}); padding: theme.spacing(2),
border: `1px solid ${theme.palette.divider}`,
borderRadius: theme.spacing(1),
}));
const StyledLink = styled(RouterLink)({ const StyledLink = styled(RouterLink)({
textDecoration: 'none', textDecoration: 'none',
@ -174,17 +177,13 @@ export const FeatureStrategyMenuCardsReleaseTemplates = ({
))} ))}
{slicedTemplates.length < templates.length && {slicedTemplates.length < templates.length &&
templates.length > RELEASE_TEMPLATE_DISPLAY_LIMIT && ( templates.length > RELEASE_TEMPLATE_DISPLAY_LIMIT && (
<StyledViewAllTemplates> <StyledViewMoreButton
<Button variant='text'
variant='text' size='small'
size='small' onClick={() => setFilter('releaseTemplates')}
onClick={() => >
setFilter('releaseTemplates') View more templates
} </StyledViewMoreButton>
>
View all available templates
</Button>
</StyledViewAllTemplates>
)} )}
</FeatureStrategyMenuCardsSection> </FeatureStrategyMenuCardsSection>
)} )}