Samples reference
Some sample Carbon component are provided in the carbon-addons-devenv
package, which you can use as a reference or aid when starting to develop new Carbon components.
- PersonFolio
- Logo
These samples contain all that is needed for Carbon components:
- The React component
- Sass
- A query provider in Apollo Client
- A JavaScript renderer wrapper function
Unit tests, a storybook wrapper, and a JavaScript documentation example are also provided.
The sample components are ready to be fully implemented and integrated into a custom UIM page by using a Java Renderer.
Examples of integrating components into a Java renderer
For guidance, the following code snippets, which don’t include the imports, demonstrate how the PersonFolio and Logo sample components can be integrated into a Java Renderer. Configuring a Java render is described in Rendering components on a UIM page
An example of integrating the sample PersonFolio component into a domain Java renderer on a UIM page is shown.
public class PersonFolioSampleRenderer extends AbstractViewRenderer {/*** Constructor.*/public PersonFolioSampleRenderer() {}/*** */
An example of integrating the sample Logo component into a domain Java renderer on a UIM page is shown.
public class LogoSampleRenderer extends AbstractViewRenderer {/*** Constructor.*/public LogoSampleRenderer() {}/*** */