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:
parent
733391a964
commit
26d7520a84
@ -8,7 +8,7 @@ import {
|
|||||||
|
|
||||||
import { Box } from '..';
|
import { Box } from '..';
|
||||||
|
|
||||||
import type { PolymorphicRef } from '../box';
|
import type { PolymorphicRef, BoxProps } from '../box';
|
||||||
|
|
||||||
import { TextProps, TextComponent } from './text.types';
|
import { TextProps, TextComponent } from './text.types';
|
||||||
|
|
||||||
@ -63,6 +63,7 @@ export const Text: TextComponent = React.forwardRef(
|
|||||||
[`mm-text--overflow-wrap-${overflowWrap}`]: Boolean(overflowWrap),
|
[`mm-text--overflow-wrap-${overflowWrap}`]: Boolean(overflowWrap),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className={classnames(computedClassName)}
|
className={classnames(computedClassName)}
|
||||||
@ -70,7 +71,7 @@ export const Text: TextComponent = React.forwardRef(
|
|||||||
dir={textDirection}
|
dir={textDirection}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
color={TextColor.textDefault}
|
color={TextColor.textDefault}
|
||||||
{...props} // TODO: Need to fix Box types to allow for spreading props
|
{...(props as BoxProps<C>)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user