Skip to content

Commit

Permalink
fix: rename HoursCard to HoursTable
Browse files Browse the repository at this point in the history
This aligns better with the PagesComponent underlying component

Requested by Aaron
  • Loading branch information
jwartofsky-yext committed Nov 12, 2024
1 parent 53c5bd7 commit 9f178d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import * as React from "react";
import { ComponentConfig, Fields } from "@measured/puck";
import { DayOfWeekNames, HoursTable, HoursType } from "@yext/pages-components";
import {
DayOfWeekNames,
HoursTable as HoursTableComponent,
HoursType,
} from "@yext/pages-components";
import { Section, sectionVariants } from "./atoms/section.js";
import "@yext/pages-components/style.css";
import { VariantProps } from "class-variance-authority";
Expand Down Expand Up @@ -78,7 +82,7 @@ const hoursCardFields: Fields<HoursCardProps> = {
},
};

const HoursCard = ({
const HoursTable = ({
hours: hoursField,
startOfWeek,
collapseDays,
Expand All @@ -101,7 +105,7 @@ const HoursCard = ({
<div>
{hours && (
<EntityField displayName="Hours" fieldId="hours">
<HoursTable
<HoursTableComponent
hours={hours}
startOfWeek={startOfWeek}
collapseDays={collapseDays}
Expand Down Expand Up @@ -131,6 +135,6 @@ export const HoursCardComponent: ComponentConfig<HoursCardProps> = {
alignment: "items-center",
padding: "none",
},
label: "Hours Card",
render: (props) => <HoursCard {...props} />,
label: "Hours Table",
render: (props) => <HoursTable {...props} />,
};
2 changes: 1 addition & 1 deletion src/components/puck/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export {
} from "./FlexContainer.tsx";
export { GridSectionComponent, type GridSectionProps } from "./GridSection.tsx";
export { HeadingTextComponent, type HeadingTextProps } from "./HeadingText.tsx";
export { HoursCardComponent, type HoursCardProps } from "./HoursCard.tsx";
export { HoursCardComponent, type HoursCardProps } from "./HoursTable.tsx";
export { HoursStatusComponent, type HoursStatusProps } from "./HoursStatus.tsx";
export { ImageWrapperComponent, type ImageWrapperProps } from "./Image.tsx";
export { PhoneComponent, type PhoneProps } from "./Phone.tsx";
Expand Down

0 comments on commit 9f178d9

Please sign in to comment.