Skip to content

Commit

Permalink
fix(breadcrumb): remove startCase (#3486)
Browse files Browse the repository at this point in the history
  • Loading branch information
MEsteves22 committed Jul 4, 2023
1 parent 91ca70a commit 052b4ce
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions docs/foundation/colors/Colors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState, useEffect } from "react";
import startCase from "lodash/startCase";
import capitalize from "lodash/capitalize";
import {
HvProvider,
Expand Down Expand Up @@ -46,7 +45,7 @@ const ColorsGroup = ({
<StyledGroup>
<div>
<StyledGroupName variant="title2">
{capitalize(startCase(group))}
{capitalize(group)}
</StyledGroupName>
<StyledColors>
{Object.values(themeColors[selectedTheme][group]).map(
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/components/BreadCrumb/BreadCrumb.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ export const WithLongLabels: StoryObj<HvBreadCrumbProps> = {
},
render: (args) => {
const longData = [
{ label: "Label 1 with some long text", path: "route1" },
{ label: "Label 2 with some long text", path: "route2" },
{ label: "Label 3 with some long text", path: "route3" },
{ label: "Label 4 with some long text", path: "route4" },
{ label: "Label 5 with some long text", path: "route5" },
{ label: "Label 1 With Some Long Text", path: "route1" },
{ label: "Label 2 With Some Long Text", path: "route2" },
{ label: "Label 3 With Some Long Text", path: "route3" },
{ label: "Label 4 With Some Long Text", path: "route4" },
{ label: "Label 5 With Some Long Text", path: "route5" },
];

return (
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/components/BreadCrumb/BreadCrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { clsx } from "clsx";
import isNil from "lodash/isNil";
import startCase from "lodash/startCase";
import { isValidElement, MouseEvent } from "react";
import { HvBaseProps } from "@core/types/generic";
import { HvDropDownMenuProps } from "@core/components";
Expand Down Expand Up @@ -123,7 +122,7 @@ export const HvBreadCrumb = ({
)}
variant="body"
>
{startCase(removeExtension(elem.label))}
{removeExtension(elem.label)}
</StyledTypography>
)) || (
<HvPage
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/components/BreadCrumb/Page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
HvTypography,
} from "@core/components";
import { ExtractNames } from "@core/utils";
import startCase from "lodash/startCase";
import { MouseEvent } from "react";
import { staticClasses, useClasses } from "./Page.styles";

Expand Down Expand Up @@ -42,7 +41,7 @@ export const HvPage = ({
className={cx(classes.link, classes.label, classes.a)}
{...others}
>
<HvOverflowTooltip data={startCase(elem.label)} />
<HvOverflowTooltip data={elem.label} />
</HvTypography>
);
};

0 comments on commit 052b4ce

Please sign in to comment.