Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running, muted, large, small, disabled props on Text component #4163

Open
switz opened this issue May 31, 2020 · 2 comments
Open

Running, muted, large, small, disabled props on Text component #4163

switz opened this issue May 31, 2020 · 2 comments

Comments

@switz
Copy link
Contributor

switz commented May 31, 2020

Environment

  • Package version(s): 3.28.1
  • Browser and OS versions: Firefox@dev, Mac@Catalina

Feature request

Any plans to add muted, running, muted, large, small, and disabled props to the Text component?

Examples

<Text muted>This is muted text</Text>
@dmackerman
Copy link
Contributor

I doubt this will be added, but in our codebase we essentially made simple wrappers for this stuff.

  return (
    <StyledText
      {...rest}
      fontSize={fontSizeProp}
      className={classNames(
        {
          [Classes.MONOSPACE_TEXT]: monospace,
          [Classes.RUNNING_TEXT]: runningText,
          [Classes.TEXT_LARGE]: large,
          [Classes.TEXT_SMALL]: small,
          [Classes.TEXT_MUTED]: muted,
          [Classes.TEXT_DISABLED]: disabled,
          [Classes.TEXT_OVERFLOW_ELLIPSIS]: ellipsis,
          [Classes.SKELETON]: showSkeleton
        },
        className
      )}
    />
  );

@adidahiya
Copy link
Contributor

We already support ellipsize as a prop to set Classes.TEXT_OVERFLOW_ELLIPSIS. So I suppose it would be appropriate to accept PRs to add prop support for other text utilities, yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants