Skip to content

Commit b4ecfd4

Browse files
aduthyouknowriadmanzoorwanijk
authored
Components: Change types export to declaration file (#72979)
* Components: Change types export to declaration file * Boot: Use ComponentProps for accessing component props Co-authored-by: aduth <aduth@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
1 parent 64e3254 commit b4ecfd4

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

packages/boot/src/components/navigation/router-link-item.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ import type { ForwardedRef } from 'react';
99
*/
1010
import { forwardRef } from '@wordpress/element';
1111
import { __experimentalItem as Item } from '@wordpress/components';
12-
import type { ItemProps } from '@wordpress/components/build-types/item-group/types';
13-
import type { WordPressComponentProps } from '@wordpress/components/build-types/context';
1412

1513
function AnchorOnlyItem(
16-
props: WordPressComponentProps< ItemProps, 'a' >,
14+
props: React.ComponentProps< typeof Item >,
1715
forwardedRef: ForwardedRef< HTMLAnchorElement >
1816
) {
1917
return <Item as="a" ref={ forwardedRef } { ...props } />;

packages/components/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
## Unreleased
44

5-
65
### Bug Fixes
76

8-
- Reexport all of the `build-types` folder from the `components` package entry point ([#72809](https://github.com/WordPress/gutenberg/pull/72809)).
97
- `TextareaControl`: Add `min-height` to the textarea element ([#72867](https://github.com/WordPress/gutenberg/pull/72867)).
108
- `Card`, `CardHeader`, `CardBody` and `CardFooter`: Add support for directional padding through object-based size prop, allowing independent control of padding for each side ([#72511](https://github.com/WordPress/gutenberg/pull/72511)).
119

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"module": "build-module/index.js",
2727
"exports": {
2828
".": {
29-
"types": "./build-types",
29+
"types": "./build-types/index.d.ts",
3030
"import": "./build-module/index.js",
3131
"require": "./build/index.js"
3232
},

0 commit comments

Comments
 (0)