github-actions
released this
07 Dec 20:52
·
342 commits
to develop
since this release
Minor Changes
-
#268
ffb2f63
Thanks @Niznikr! - Add register utility:-
Update
PharosElement
to set[data-pharos-component]
withconstructor.name
-
Update
PharosComponentMixin
to set[data-pharos-component]
with base class name -
Add register utility to simplify component registration and ensure trivial classes are used for custom elements:
import { PharosAlert, PharosButton, PharosIcon } from '@ithaka/pharos'; import registerComponents from '@ithaka/pharos/lib/utils/registerComponents'; registerComponents('{prefix}', [PharosAlert, PharosButton, PharosIcon]);
-
Add a React Pharos context provider for consumers to indicate prefix used for registration:
import { PharosContext } from '@ithaka/pharos/lib/utils/PharosContext'; const context = { prefix: 'homepage' }; <PharosContext.Provider value={context}>...app code</PharosContext.Provider>;
-