diff --git a/packages/math-input/src/fake-react-native-web/index.ts b/packages/math-input/src/fake-react-native-web/index.ts index 5c52ca560d..7eaa38810f 100644 --- a/packages/math-input/src/fake-react-native-web/index.ts +++ b/packages/math-input/src/fake-react-native-web/index.ts @@ -7,5 +7,4 @@ * StyleSheets instead. */ -export {default as Text} from "./text"; export {default as View} from "./view"; diff --git a/packages/math-input/src/fake-react-native-web/text.tsx b/packages/math-input/src/fake-react-native-web/text.tsx deleted file mode 100644 index f723b4e9fb..0000000000 --- a/packages/math-input/src/fake-react-native-web/text.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import {StyleSheet, css} from "aphrodite"; -import * as React from "react"; - -import type {StyleType} from "@khanacademy/wonder-blocks-core"; -import type {CSSProperties} from "aphrodite"; - -type Props = { - children: React.ReactNode; - // The `dynamicStyle` prop is provided for animating dynamic - // properties, as creating Aphrodite StyleSheets in animation loops is - // expensive. `dynamicStyle` should be a raw style object, rather than - // a StyleSheet. - dynamicStyle?: CSSProperties; - numberOfLines?: number; - style?: StyleType; -}; - -class Text extends React.Component { - render(): React.ReactNode { - const {numberOfLines, style} = this.props; - - const className = css( - styles.initial, - ...(Array.isArray(style) ? style : [style]), - numberOfLines === 1 && styles.singleLineStyle, - ); - - return ( - - {this.props.children} - - ); - } -} - -// https://github.com/necolas/react-native-web/blob/master/src/components/Text/index.js -const styles = StyleSheet.create({ - initial: { - color: "inherit", - display: "inline", - font: "inherit", - margin: 0, - padding: 0, - textDecorationLine: "none", - wordWrap: "break-word", - }, - singleLineStyle: { - maxWidth: "100%", - overflow: "hidden", - textOverflow: "ellipsis", - whiteSpace: "nowrap", - }, -}); - -export default Text;