Skip to content

Commit

Permalink
Fix selector and update selector type to enforce class selector pat…
Browse files Browse the repository at this point in the history
…tern
  • Loading branch information
sarayourfriend committed May 17, 2021
1 parent 646926b commit ed71ecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type PolymorphicComponent< T extends As, O > = {
): JSX.Element | null;
( props: ViewOwnProps< O, T > ): JSX.Element | null;
displayName?: string;
selector: string;
selector: `.${ string }`;
};

export type CreatePolymorphicComponent< T extends As, P > = (
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/view/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import styled from '@emotion/styled';
*/
// @ts-ignore
const View = styled.div``;
View.selector = 'components-view';
View.selector = '.components-view';
View.displayName = 'View';

export default View;

0 comments on commit ed71ecc

Please sign in to comment.