import { Text, TextProps } from '@wix/design-system';
import { st, classes } from './MaxHeightText.st.css.js';
import React from 'react';

export function MaxHeightText(props: TextProps & { lineHeight?: number }) {
  const { lineHeight, className, ...rest } = props;

  return (
    <Text
      {...rest}
      className={st(
        classes.root,
        {
          height24: lineHeight === 24,
        },
        className,
      )}
    />
  );
}
