wp-component-utils
v1.0.0
Published
Utility functions and types for working with WordPress components.
Readme
wp-component-utils
Utility functions and types for working with WordPress components.
Installation
npm install wp-component-utilsUsage
This package provides TypeScript utility types for working with WordPress components.
import type { WordPressComponentProps } from 'wp-component-utils';
export function MyInputBasedComponent(
props: WordPressComponentProps< MyInputBasedComponentProps, 'input' >
) {
const { label, hideLabelFromVision, ...inputProps } = props;
// Component logic and rendering.
}API
Types
The package exports comprehensive TypeScript interfaces for WordPress components, including:
WordPressComponentPropsWordPressComponentWordPressComponentFromProps
Contributing
Contributions to the wp-component-utils package are welcome. It is being developed in a monorepo alongside my other WordPress NPM packages. Please review the contributing guidelines to learn more about how you can contribute.
