Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { errorMsg } from '../../shared/logUtils';
import { mergeRefs } from '../../shared/mergeRefs';
import { useNativeProps } from './useNativeProps';
import { useStrictDOMElement } from './useStrictDOMElement';
import * as stylex from '../stylex';

type StrictProps = $ReadOnly<{
...StrictPropsOriginal,
Expand All @@ -31,7 +30,7 @@ function hasElementChildren(children: mixed): boolean {

export function createStrictDOMTextComponent<T, P: StrictProps>(
tagName: string,
_defaultProps?: P
defaultProps?: P
): component(ref?: React.RefSetter<T>, ...P) {
const component: React.AbstractComponent<P, T> = React.forwardRef(
function (props, forwardedRef) {
Expand All @@ -44,10 +43,6 @@ export function createStrictDOMTextComponent<T, P: StrictProps>(
* Resolve global HTML and style props
*/

const defaultProps = {
style: [_defaultProps?.style, styles.userSelectAuto]
};

const { customProperties, nativeProps, inheritableStyle } =
useNativeProps(defaultProps, props, {
provideInheritableStyle:
Expand Down Expand Up @@ -151,9 +146,3 @@ export function createStrictDOMTextComponent<T, P: StrictProps>(
component.displayName = `html.${tagName}`;
return component;
}

const styles = stylex.create({
userSelectAuto: {
userSelect: 'auto'
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ exports[`<compat.native> nested: nested 1`] = `
"boxSizing": "content-box",
"color": "red",
"position": "static",
"userSelect": "auto",
}
}
>
Expand Down
Loading