chore: harmonized all button sizes in settings (#21457)

This commit is contained in:
Lucas Boilly 2024-09-25 03:18:18 -05:00 committed by GitHub
parent 55dabf6295
commit 927824c76d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 4 additions and 8 deletions

View File

@ -11,6 +11,7 @@ import {
TextInput, TextInput,
Typography, Typography,
} from '@strapi/design-system'; } from '@strapi/design-system';
import { Check } from '@strapi/icons';
import { format } from 'date-fns'; import { format } from 'date-fns';
import { Formik, Form, FormikHelpers } from 'formik'; import { Formik, Form, FormikHelpers } from 'formik';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
@ -197,14 +198,13 @@ const CreatePage = () => {
handleReset(); handleReset();
permissionsRef.current?.resetForm(); permissionsRef.current?.resetForm();
}} }}
size="L"
> >
{formatMessage({ {formatMessage({
id: 'app.components.Button.reset', id: 'app.components.Button.reset',
defaultMessage: 'Reset', defaultMessage: 'Reset',
})} })}
</Button> </Button>
<Button type="submit" loading={isSubmitting} size="L"> <Button type="submit" loading={isSubmitting} startIcon={<Check />}>
{formatMessage({ {formatMessage({
id: 'global.save', id: 'global.save',
defaultMessage: 'Save', defaultMessage: 'Save',

View File

@ -1,6 +1,7 @@
import * as React from 'react'; import * as React from 'react';
import { Box, Button, Flex, Main } from '@strapi/design-system'; import { Box, Button, Flex, Main } from '@strapi/design-system';
import { Check } from '@strapi/icons';
import { Formik, FormikHelpers } from 'formik'; import { Formik, FormikHelpers } from 'formik';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';
import { Navigate, useMatch } from 'react-router-dom'; import { Navigate, useMatch } from 'react-router-dom';
@ -191,9 +192,9 @@ const EditPage = () => {
<Flex gap={2}> <Flex gap={2}>
<Button <Button
type="submit" type="submit"
startIcon={<Check />}
disabled={role.code === 'strapi-super-admin'} disabled={role.code === 'strapi-super-admin'}
loading={isSubmitting} loading={isSubmitting}
size="L"
> >
{formatMessage({ {formatMessage({
id: 'global.save', id: 'global.save',

View File

@ -191,7 +191,6 @@ const EditPage = () => {
startIcon={<Check />} startIcon={<Check />}
loading={isSubmitting} loading={isSubmitting}
type="submit" type="submit"
size="L"
> >
{formatMessage({ id: 'global.save', defaultMessage: 'Save' })} {formatMessage({ id: 'global.save', defaultMessage: 'Save' })}
</Button> </Button>

View File

@ -98,7 +98,6 @@ const WebhookForm = ({
variant="tertiary" variant="tertiary"
startIcon={<Publish />} startIcon={<Publish />}
disabled={isCreating || isTriggering} disabled={isCreating || isTriggering}
size="L"
> >
{formatMessage({ {formatMessage({
id: 'Settings.webhooks.trigger', id: 'Settings.webhooks.trigger',
@ -108,7 +107,6 @@ const WebhookForm = ({
<Button <Button
startIcon={<Check />} startIcon={<Check />}
type="submit" type="submit"
size="L"
disabled={!modified} disabled={!modified}
loading={isSubmitting} loading={isSubmitting}
> >

View File

@ -144,7 +144,6 @@ export const SingleSignOnPage = () => {
loading={isSubmitting} loading={isSubmitting}
startIcon={<Check />} startIcon={<Check />}
type="submit" type="submit"
size="L"
> >
{formatMessage({ {formatMessage({
id: 'global.save', id: 'global.save',

View File

@ -335,7 +335,6 @@ const EditPage = () => {
<Button <Button
startIcon={<Check />} startIcon={<Check />}
type="submit" type="submit"
size="M"
disabled={!modified || isSubmitting || values.stages.length === 0} disabled={!modified || isSubmitting || values.stages.length === 0}
// if the confirm dialog is open the loading state is on // if the confirm dialog is open the loading state is on
// the confirm button already // the confirm button already