question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typings on Text component are incorrect on the latest release

See original GitHub issue

The latest release of Grommet (2.16.3) includes new additional sizes for the Text component. The typings for these new sizes are incorrect in that these properties are not optional.

'2xl?': {
      size?: string;
      height?: string;
      maxWidth?: string;
    };
3xl?': {
      size?: string;
      height?: string;
      maxWidth?: string;
    };
'4xl?': {
      size?: string;
      height?: string;
      maxWidth?: string;
    };
'5xl?': {
      size?: string;
      height?: string;
      maxWidth?: string;
    };
'6xl?': {
      size?: string;
      height?: string;
      maxWidth?: string;
    };
    '

These sizes should be optional. The optional property should not be within the string value of the key.

Actual Behavior

URL, screen shot, or Codepen exhibiting the issue

Source in Code - lines: 1194 - 1217

Steps to Reproduce

Running Grommet with TypeScript causes these properties to be non-optional with custom themes.

Your Environment

  • Grommet version: ^2.15.2
  • Browser Name and version: Chrome Version 88.0.4324.96
  • Operating System and version (desktop or mobile): Mac OS Catalina 10.15.7

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ShimiSuncommented, Feb 4, 2021

Thanks, feel free to make a contribution, this feature was introduced on 2.16.3 so that will be the explicit version of the issue for whoever tries to fix it.

0reactions
andrewthamcccommented, Feb 5, 2021

Thank you for reporting and fixing the issue 💟

My pleasure! It was a simple fix. I was especially motivated because the latest release broke our Builds and CI/CD at work. We just rolled our versions back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A component is changing an uncontrolled input of type text to ...
A component is changing an uncontrolled input of type text to be controlled. Possible Solutions: 1- Define the fields in state as:
Read more >
Wrong input inserting unwanted text #146 - GitHub
I have started using this library in my React Native app and came across the following issue. Steps to reproduce: Set up ...
Read more >
Uncontrolled Components - React
In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by...
Read more >
Controlled vs. uncontrolled components in React
In this tutorial, we'll explain the difference between controlled and uncontrolled components in React with practical examples.
Read more >
How To Customize React Components with Props
Props are arguments that you provide to a JSX element in a React application. ... Open the new file in your text editor:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found