feat(settings): add loading state to save buttons (#11639)

Introduce a loading state to SaveButton and SaveAndCancelButtons
components to enhance user feedback during save operations. Update
SettingsNewObject to manage the loading state while submitting the form.

Fix https://github.com/twentyhq/core-team-issues/issues/572

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Antoine Moreaux
2025-06-23 22:49:38 +02:00
committed by GitHub
parent d248e536f3
commit 4eb859256c
6 changed files with 45 additions and 27 deletions

View File

@ -15,7 +15,7 @@ const StyledLoaderContainer = styled.div<{
border-radius: ${({ theme }) => theme.border.radius.pill};
border: 1px solid
${({ color, theme }) =>
color ? theme.tag.text[color] : theme.font.color.tertiary};
color ? theme.tag.text[color] : `var(--tw-button-color)`};
overflow: hidden;
`;
@ -23,7 +23,7 @@ const StyledLoader = styled(motion.div)<{
color?: ThemeColor;
}>`
background-color: ${({ color, theme }) =>
color ? theme.tag.text[color] : theme.font.color.tertiary};
color ? theme.tag.text[color] : `var(--tw-button-color)`};
border-radius: ${({ theme }) => theme.border.radius.pill};
height: 8px;
width: 8px;