32c402413a
* Move ValidatedTextInput and ValidationInputError to checkout package * Include checkout package in tsconfig file * Remove unnecessary index file We export these components from packages/checkout/index.js instead * Import ValidatedTextInput & ValidationInput error from checkout package * Only add validationError.message when validationError is an object * Explicitly add undefined to optional props * Import isObject to test validationError * Extend the HTML Input element attributes * Use more performant useDispatch instead of dispatch * Export component without withInstanceId hoc for testing * Add tests for ValidatedTextInput * bot: update checkstyle.xml * Rename export of unwrapped component to have __ Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
button | ||
checkbox-control | ||
discounts-meta | ||
error-boundary | ||
label | ||
order-meta | ||
order-shipping-packages | ||
panel | ||
text-input | ||
totals | ||
totals-wrapper | ||
validation-input-error | ||
README.md | ||
index.js |
README.md
Components
A library of components to be used for creating common UI elements shared between features of the WooCommerce Cart and Checkout Blocks.
Usage
When WooCommerce Blocks is installed and activated, these components can be accessed by importing from the blocks-checkout
package.
// Aliased import
import { Button } from '@woocommerce/blocks-checkout';
// Global import
// const { Button } = wc.blocksCheckout;
export default function MyButton() {
return <Button>Click Me!</Button>;
}
These components are here so they can be consumed by extensions.
We're hiring! Come work with us!
🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.