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.

Icon prop on Button component uses incorrect capitalization

See original GitHub issue

The Icon property on the Button component uses PascalCase rather than camelCase for the prop name. Is this intentional or a bug?

import { ReloadIcon } from "someiconlibrary"

<div>                   // here
    <Button text="Reload" Icon={ReloadIcon} importance="primary" />
</div>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mitrotasioscommented, Oct 11, 2022

Seems like it, thanks for that! We are super busy at the moment so it may take a bit to fix this. Therefore, feel free to open a PR whenever you like, would be happy to have you as our first outside contributor 😃

1reaction
cursecodescommented, Oct 11, 2022

Yes, I feel that that would be the correct move. You can see in the links provided that it seems to be the standard to use camelCase for all props.

Chakra Evergreen by Segment

If you need, I will gladly open a PR to change this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uppercase text in Button · Issue #1033 · GeekyAnts/NativeBase
I have a button with face book icon Login with facebook with text "Login ... props to every Text it will set uppercase...
Read more >
Incorrect casing error with dynamically rendered component in ...
Warning: is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements. Warning: The tag is unrecognized in ...
Read more >
JSX In Depth - React
Capitalized types indicate that the JSX tag is referring to a React component. These tags get compiled into a direct reference to the...
Read more >
Useful Patterns by Use Case - React TypeScript Cheatsheets
Usecase: you want to make a <Button> that takes all the normal props of ... then you can use ComponentPropsWithRef to grab props...
Read more >
How to create and style custom buttons in React Native
Learn how to create custom UI components with React Native three ways — creating your own, using a CSS-in-JS library, and by adding...
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