Skip to content

Commit 8f63533

Browse files
soheilnikroopwizla
andauthored
Update customization options for admin panel (#2478)
* Update options.md Fix the GitHub link in theme customization Add a better explanation to edit theme colors and translations keys * Update docusaurus/docs/cms/admin-panel-customization/options.md * Update docusaurus/docs/cms/admin-panel-customization/options.md * Update docusaurus/docs/cms/admin-panel-customization/options.md * Update docusaurus/docs/cms/admin-panel-customization/options.md * Update docusaurus/docs/cms/admin-panel-customization/options.md * Update docusaurus/docs/cms/admin-panel-customization/options.md --------- Co-authored-by: Pierre Wizla <[email protected]>
1 parent cb32a82 commit 8f63533

File tree

1 file changed

+24
-9
lines changed
  • docusaurus/docs/cms/admin-panel-customization

1 file changed

+24
-9
lines changed

docusaurus/docs/cms/admin-panel-customization/options.md

+24-9
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export default {
118118
<TabItem value="ts" label="TypeScript">
119119

120120
```jsx title="/src/admin/app.ts"
121+
// Note: you may see some ts errors, don't worry about them
121122
import AuthLogo from "./extensions/my-logo.png";
122123
import MenuLogo from "./extensions/logo.png";
123124
import favicon from "./extensions/favicon.png";
@@ -142,16 +143,25 @@ export default {
142143
},
143144
// Override or extend the theme
144145
theme: {
145-
colors: {
146-
primary100: "#f6ecfc",
147-
primary200: "#e0c1f4",
148-
primary500: "#ac73e6",
149-
primary600: "#9736e8",
150-
primary700: "#8312d1",
151-
danger700: "#b72b1a",
152-
},
146+
dark:{
147+
colors: {
148+
alternative100: '#f6ecfc',
149+
alternative200: '#e0c1f4',
150+
alternative500: '#ac73e6',
151+
alternative600: '#9736e8',
152+
alternative700: '#8312d1',
153+
buttonNeutral0: '#ffffff',
154+
buttonPrimary500: '#7b79ff',
155+
// you can see other colors in the link below
156+
},
157+
},
158+
light:{
159+
// you can see the light color here just like dark colors https://github.com/strapi/design-system/blob/main/packages/design-system/src/themes/lightTheme/light-colors.ts
160+
},
161+
},
153162
},
154163
// Extend the translations
164+
// you can see the traslations keys here https://github.com/strapi/strapi/blob/develop/packages/core/admin/admin/src/translations
155165
translations: {
156166
fr: {
157167
"Auth.form.email.label": "test",
@@ -171,6 +181,11 @@ export default {
171181
};
172182
```
173183

184+
:::note
185+
You can see the full translation keys, for instance to change the welcome message, [on GitHub](https://github.com/strapi/strapi/blob/develop/packages/core/admin/admin/src/translations).
186+
Light and dark colors are also found [on GitHub](https://github.com/strapi/design-system/tree/main/packages/design-system/src/themes).
187+
:::
188+
174189
</TabItem>
175190
</Tabs>
176191

@@ -445,5 +460,5 @@ To extend the theme, use either:
445460
- the `config.theme.dark` key for the Dark mode
446461
447462
:::strapi Strapi Design System
448-
The default <ExternalLink to="https://github.com/strapi/design-system/tree/main/packages/strapi-design-system/src/themes" text="Strapi theme"/> defines various theme-related keys (shadows, colors…) that can be updated through the `config.theme.light` and `config.theme.dark` keys in `./admin/src/app.js`. The <ExternalLink to="https://design-system.strapi.io/" text="Strapi Design System"/> is fully customizable and has a dedicated <ExternalLink to="https://design-system-git-main-strapijs.vercel.app" text="StoryBook"/> documentation.
463+
The default <ExternalLink to="https://github.com/strapi/design-system/tree/main/packages/design-system/src/themes" text="Strapi theme"/> defines various theme-related keys (shadows, colors…) that can be updated through the `config.theme.light` and `config.theme.dark` keys in `./admin/src/app.js`. The <ExternalLink to="https://design-system.strapi.io/" text="Strapi Design System"/> is fully customizable and has a dedicated <ExternalLink to="https://design-system-git-main-strapijs.vercel.app" text="StoryBook"/> documentation.
449464
:::

0 commit comments

Comments
 (0)