3ebcd7f601
* Add CartEventsContext with onProceedToCheckout event * Wrap Cart in CartEventsProvider * Dispatch onProceedToCheckout event when button is pressed * Update type of children on CartEventsProvider * Add test for ProceedToCheckout block * Add tests for CartEventProvider * Remove superfluous div * Fix incorrect nesting after rebase * Wrap mini cart in CartEventsProvider * Dispatch onProceedToCheckout event when clicking button in mini cart * Add tests for mini cart onProceedToCheckout emitter * Make observer fail so navigation isn't attempted * Prevent console error on navigation * Try preventing navigation in unit tests * Try preventing navigation in unit tests * Try preventing navigation in unit tests * Try preventing navigation in unit tests * Try preventing navigation in unit tests * Try preventing navigation in unit tests * Try preventing navigation in unit tests |
||
---|---|---|
.. | ||
components | ||
context | ||
hocs | ||
hooks | ||
utils | ||
README.MD |
README.MD
Base Components/Context/Hooks
Base components are designed to be used on the frontend of a store. Due to this, we need to avoid using heavy WordPress externals as dependencies (wp-components, wp-block-editor, etc). To get around this, import from a local package instead.
e.g. Instead of importing from @wordpress/components
, use:
import { Component } from 'wordpress-components';
Check the built *.assets.php
files to ensure extra dependencies aren't being added to the build.