diff --git a/docs/getting-started/app-custom-theme.md b/docs/getting-started/app-custom-theme.md index da4f10a64b..25e5ff9237 100644 --- a/docs/getting-started/app-custom-theme.md +++ b/docs/getting-started/app-custom-theme.md @@ -273,6 +273,115 @@ const LogoFull = () => { }; ``` +## Custom Icons + +You can also customize the Project's _default_ icons. + +We can change the following icons: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Icons
brokenImagechat
dashboarddocs
emailgithub
grouphelp
"kind:api""kind:component"
"kind:domain""kind:group"
"kind:location""kind:system"
"kind:user"scaffolder
searchtechdocs
userwarning
+
+ +### Requirements + +- Files in `.svg` format; +- React components created for the icons + +### Create React Component + +In your front-end application, locate the `src` folder. We suggest creating the `assets/icons` directory. + +In the `icons` directory, upload the files in `.svg` format. + +In the `assets` directory, you can create the `customIcons.tsx` file. + +```tsx +// customIcons.tsx +import React from 'react'; +import ExampleSVG from './icons/example.svg'; + +export const ExampleIcon = () => { + return ; +}; +``` + +### Using the custom icon + +In your front-end application, locate the `src/components` folder. + +You will find the `App.tsx` file. + +The `app` constant, instantiates the `createApp` function, in this constant we will use the "icons" parameter that receives an object. + +```diff + ++ import { ExampleIcon } from './assets/customIcons' + +[...] + +const app = createApp({ + apis, + components: { + [...] + }, + themes: [ + [...] + ], ++ icons: { ++ github: ExampleIcon, ++ }, + bindRoutes({ bind }) { + [...] + } +}) + +[...] +``` + ## Custom Homepage In addition to a custom theme, a custom logo, you can also customize the