woocommerce/plugins/woocommerce-blocks/assets/js/base
Tarun Vijwani 80344fa04b Convert tabs component to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/7865)
* Convert tabs component to TypeScript

* Add tabs component story

* Add desciptions in comments to the Tab props

* Rename and export tabs component to display descriptions in Storybook

Renamed Tabs component to __Tabs as a sign it should not be used directly. Since we were using withInstanceId as the default export and were not exporting the Tabs component, Storybook could not retrieve the description and default values. We have renamed and exported the component to make sure Storybook can pick up the descriptions and default values.

* Rename exported Tabs component

Changed the exported Tabs component from __Tabs to __TabsWithoutInstanceId to make it more descriptive.
2023-01-12 16:16:32 +04:00
..
components Convert tabs component to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/7865) 2023-01-12 16:16:32 +04:00
context useCollection hook: Do not bail early if isEditor (https://github.com/woocommerce/woocommerce-blocks/pull/8079) 2023-01-10 15:17:51 +01:00
hocs Upgrade wp-prettier to 2.6.2 and reformat the codebase (https://github.com/woocommerce/woocommerce-blocks/pull/6566) 2022-06-15 11:56:52 +02:00
hooks Avoid usage of `@wordpress/components` inside base components (https://github.com/woocommerce/woocommerce-blocks/pull/7996) 2023-01-11 17:12:06 +00:00
utils Simplify @woocommerce/types imports (https://github.com/woocommerce/woocommerce-blocks/pull/8019) 2022-12-23 18:59:02 +07:00
README.MD Avoid usage of `@wordpress/components` inside base components (https://github.com/woocommerce/woocommerce-blocks/pull/7996) 2023-01-11 17:12:06 +00:00

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.