Using component types

import Text from "@kiwicom/orbit-components/lib/Text";
interface Props {
type: string;
}
const WrappedText = ({ children, type }) => <Text type={type}>{children}</Text>;
export default WrappedText;

Typescript

import Text, { Props as TextProps } from "@kiwicom/orbit-components/lib/Text";
interface Props {
type: TextProps["type"];
}
const WrappedText = ({ children, type }) => <Text type={type}>{children}</Text>;
export default WrappedText;