PavelOreshkin / react-components-id-generator

package for generating IDs by config to help with auto testing
MIT License
3 stars 1 forks source link

Add support id_name in rules #1

Open VonragLirik opened 7 months ago

VonragLirik commented 7 months ago

Hi, good library, but have some issues.

  1. If you have wrapper and want generate attribute for it. In react we use camelCase in props, so prop should be in camelCase, but in component I want use data-qa attribute. So in wrapper I add props dataQa and it pass data-qa to component. So, please, add id_name in rules and then I can change to "dataQa"
  2. Will be good replace all space to _. for example attr:label and label="first name" will be good generate "first_name"
  3. Will be great support nested components. For example some library export Modal.Body, Modal.Title etc and parser is broken on it

Thank you! If you know russian we can chat in Russian

VonragLirik commented 7 months ago

@PavelOreshkin any news?