Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak WordPressComponent type #49960

Merged
merged 2 commits into from
Apr 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Tweak WordPressComponent type
mirka committed Apr 20, 2023
commit 65641993b7c1de8a4ebae5287177286b0904c073
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ export type WordPressComponent<
* We restrict it to a class to align with the already existing class names that
* are generated by the context system.
*/
selector: `.${ string }`;
selector?: `.${ string }`;
};

export type WordPressComponentFromProps<
4 changes: 2 additions & 2 deletions packages/components/src/view/component.tsx
Original file line number Diff line number Diff line change
@@ -27,10 +27,10 @@ import type { ViewProps } from './types';
* }
* ```
*/
// @ts-expect-error
export const View: WordPressComponent<
'div',
ViewProps & RefAttributes< any >
ViewProps & RefAttributes< any >,
true
> = styled.div``;

View.selector = '.components-view';