stack icon indicating copy to clipboard operation
stack copied to clipboard

[Feature Request] Built-in props on components to allow for custom labels and terminology

Open ymdahi opened this issue 8 months ago • 3 comments

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.

ymdahi avatar Apr 26 '25 21:04 ymdahi

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" />

ymdahi avatar Apr 26 '25 21:04 ymdahi

Can I work on this?

A-Vamshi avatar Jun 01 '25 09:06 A-Vamshi

I need this feature too!

hkaiser25 avatar Jun 18 '25 18:06 hkaiser25