Skip to content

Commit 00d5aca

Browse files
Merge pull request #33 from mezh-hq/fix/category-manager-title
Fix: category manager and section manager titles
2 parents 308d9ae + 59a694e commit 00d5aca

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/components/controls/select/polyline/section-selector.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ const onDeleteSection = (id: string) => store.dispatch(deleteSection(id));
1515

1616
const onUpdateSection = debounce((section) => store.dispatch(updateSection(section)), 150);
1717

18-
type IControlProps = Pick<ISTKProps, "options" | "styles">;
18+
type IControlProps = Pick<ISTKProps, "options" | "styles"> & { title?: string };
1919

20-
export const SectionManager = ({ options }: IControlProps) => {
20+
export const SectionManager = ({ options, title = "Sections" }: IControlProps) => {
2121
const sections = useSelector((state: any) => state.editor.sections);
2222
return (
2323
<div className="flex flex-col gap-3">
2424
<div className="w-full flex justify-between items-center gap-4">
25-
<h6 className="font-medium text-sm">Sections</h6>
25+
<h6 className="font-medium text-sm">{title}</h6>
2626
<IconButton
2727
className="w-6 h-6 p-0"
2828
variant="secondary"
@@ -95,7 +95,7 @@ const SectionSelector = ({ firstElement, selectedElementIds, options }: IControl
9595
/>
9696
</PopoverTrigger>
9797
<PopoverContent className="bg-white w-80 py-4 mr-4">
98-
<SectionManager options={options} />
98+
<SectionManager options={options} title="Options" />
9999
</PopoverContent>
100100
</Popover>
101101
</div>

src/components/controls/select/seats/categorizer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ const onSectionSelect = (e: MouseEvent<HTMLButtonElement>) => {
2424
store.dispatch(updateCategory({ id: categoryId, section: +sectionId === 0 ? null : sectionId }));
2525
};
2626

27-
type IControlProps = Pick<ISTKProps, "options" | "styles">;
27+
type IControlProps = Pick<ISTKProps, "options" | "styles"> & { title?: string };
2828

29-
export const CategoryManager = ({ options }: IControlProps) => {
29+
export const CategoryManager = ({ options, title = "Categories" }: IControlProps) => {
3030
const categories = useSelector((state: any) => state.editor.categories);
3131
const sections = useSelector((state: any) => state.editor.sections);
3232
const seats = useSelector((state: any) => state.editor.seats);
3333
return (
3434
<div className="grid gap-4">
3535
<div className="flex gap-2 justify-between items-center">
36-
<h6 className="font-medium text-sm">Options</h6>
36+
<h6 className="font-medium text-sm">{title}</h6>
3737
<IconButton
3838
className="w-6 h-6 p-0"
3939
variant="secondary"
@@ -127,7 +127,7 @@ const Categorizer = ({ firstElement, selectedElementIds, options }: IControlProp
127127
<IconButton className="w-6 h-6 p-0 shrink-0" variant="secondary" icon={<Settings2 className="w-4 h-4" />} />
128128
</PopoverTrigger>
129129
<PopoverContent className="bg-white w-80 py-4 mr-4">
130-
<CategoryManager options={options} />
130+
<CategoryManager options={options} title="Options" />
131131
</PopoverContent>
132132
</Popover>
133133
</div>

0 commit comments

Comments
 (0)