Files
medusa-store/packages/admin-next/dashboard/src/lib/format-provider.ts
Kasper Fabricius Kristensen 44a5567d0d feat(dashboard): Regions domain (#6534)
**What**
- Implements new Region domain design
- Adds new SplitView component for managing adding nested relations in FocusModals, eg. adding countries to a region.
- Adds new Combobox component for multi select fields in forms

**medusajs/ui**
- Fix styling of RadioGroup.Choicebox component

CLOSES CORE-1650, CORE-1671
2024-02-29 13:16:14 +00:00

13 lines
335 B
TypeScript

/**
* Providers only have an ID to identify them. This function formats the ID
* into a human-readable string.
* @param id - The ID of the provider
* @returns A formatted string
*/
export const formatProvider = (id: string) => {
return id
.split("-")
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
.join(" ")
}