GroupBy Elements Base
Functionality
This class extends LitElement and is the class that all components will extend. Any shared functionality should be contained within this class.
Dispatching events
This class contains a generic event dispatch function, dispatchElementsEvent
. The dispatchElementsEvent
function constructs a CustomEvent with payload properties that are common across the GB Elements components. This function can be used across all components that extend Base to dispatch events.
Rendering the light DOM
All components that extend Base
will render in the Light DOM.
Testing
The test suite for this component is contained in the test
directory.
To run the tests, navigate to this folder and use one of the following commands based on the desired testing flow:
- To run the tests once:
yarn test
- To run the tests and watch the
src
andtest
directories for changes:
yarn tdd