stack
stack copied to clipboard
[Feature Request] Built-in props on components to allow for custom labels and terminology
Problem
I want to use the word "Course" in place of the word "Team".
For example, in the SelectedTeamSwitcher component, instead of "Create a Team", the terminology "Create a Course" is better suited for my effort. The same applies to other components as well, including account-settings components.
Currently, I have to fork the component to make this work.
e.g.
type SelectedTeamSwitcherProps = {
// ...existing props
entityName?: string; // e.g., "Course"
};
then:
function SelectedTeamSwitcher({ entityName = "Team", ...props }: SelectedTeamSwitcherProps) {
// ...
<SelectValue placeholder={`Select ${entityName.toLowerCase()}`} />
// ...
<SelectLabel>{`Current ${entityName.toLowerCase()}`}</SelectLabel>
// ...
<SelectLabel>{`Other ${entityName.toLowerCase()}s`}</SelectLabel>
// ...
<Button>{`Create ${entityName}`}</Button>
// ...
}
Further usage:
<SelectedTeamSwitcher entityName="Course" />
Can I work on this?
I need this feature too!