Making components customizable

The components included in this chapter will appear in Lightning App Builder and are thus available for the developer and consumers of the package to drag and drop them onto pages. Because they are global they can also use them in their own component code:

Making components customizable

This is due to the following aspects:

  • The access attribute on the components is set to global.
  • They implement applicable flexipage and force interfaces.
  • Though not required, the .design files specify a component label:
    <design:component label="Race Calendar">
    </design:component>
  • The .svg file for the c:CheckCompliance component defines a custom icon that is displayed next to the component in the Lightning App Builder.
  • Though not required, the Race Result component also includes additional markup to indicate to Lightning App Builder, the component is only relevant to the Race__c custom object:
    <design:component label="Race Results">
    <sfdc:objects>
    <sfdc:object>Race__c</sfdc:object>
    </sfdc:objects>
    </design:component>

Tip

The components can also declare attributes that appear in the configuration panel to the right of the Lightning App Builder design surface. These are expressed using the design:attribute element within the .design file. These must match those expressed in the component markup. Any attributes exposed this way must also have an access level of global.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.254.118