canonical / canonical/react-components

Define prop naming conventions

Open
#762 5 comments 0 reactions 0 assignees View on GitHub
P3 Triaged Question ❓ Triaged: new architecture
Dominant language
TypeScript
Stars
151
Forks
74
Avg merge
1d 2h
Merged PRs (30d)
11

Description

## What
We should have a common way of translating base/modifier classes that exist in vanilla to props in `react-components`.

For example, the `help` prop in `Input` could be named `formHelpText` instead to match `p-form-help-text` from Vanilla.
There are many examples for inconsistencies like that.

## Why
This would make working with react-components more intuitive for people who are already familiar with the vanilla framework (and vice-versa).

## Other considerations
If we agree on a naming convention it might be worth updating all components props at some point even though there will be breaking changes.

---
Originally raised by @bartaz https://github.com/canonical-web-and-design/react-components/pull/761#discussion_r850305544

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.