1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

fix Box ts spread props issue (#20107)

This commit is contained in:
Garrett Bear 2023-07-20 15:06:28 -07:00 committed by GitHub
parent 733391a964
commit 26d7520a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ import {
import { Box } from '..';
import type { PolymorphicRef } from '../box';
import type { PolymorphicRef, BoxProps } from '../box';
import { TextProps, TextComponent } from './text.types';
@ -63,6 +63,7 @@ export const Text: TextComponent = React.forwardRef(
[`mm-text--overflow-wrap-${overflowWrap}`]: Boolean(overflowWrap),
},
);
return (
<Box
className={classnames(computedClassName)}
@ -70,7 +71,7 @@ export const Text: TextComponent = React.forwardRef(
dir={textDirection}
ref={ref}
color={TextColor.textDefault}
{...props} // TODO: Need to fix Box types to allow for spreading props
{...(props as BoxProps<C>)}
>
{children}
</Box>