Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Extract constant to theme.ts

dominik-zeglen83fc537e0bc1
diff --git a/saleor/static/dashboard-next/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx b/saleor/static/dashboard-next/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx
index 6fa2ddc7e4..4b0717b8b3 100644
--- a/saleor/static/dashboard-next/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx
+++ b/saleor/static/dashboard-next/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.tsx
@@ -18,6 +18,7 @@ import {
renderCollection,
translatedAuthorizationKeyTypes
} from "../../../misc";
+import { ICONBUTTON_SIZE } from "../../../theme";
import { AuthorizationKeyType } from "../../../types/globalTypes";
import { SiteSettings_shop_authorizationKeys } from "../../types/SiteSettings";
@@ -33,7 +34,7 @@ const decorate = withStyles(theme => ({
"&:last-child": {
paddingRight: 0
},
- width: 48 + theme.spacing.unit / 2
+ width: ICONBUTTON_SIZE + theme.spacing.unit / 2
}
}));
const SiteSettingsKeys = decorate<SiteSettingsKeysProps>(
diff --git a/saleor/static/dashboard-next/theme.ts b/saleor/static/dashboard-next/theme.ts
index 2a619d80bf..5c110abd93 100644
--- a/saleor/static/dashboard-next/theme.ts
+++ b/saleor/static/dashboard-next/theme.ts
@@ -12,6 +12,8 @@ const primary = "#5AB378";
const secondary = "#03a9f4";
const error = "#CD5E5E";
+export const ICONBUTTON_SIZE = 48;
+
export default createMuiTheme({
overrides: {
MuiButton: {