Skip to content

Commit c33b599

Browse files
refactor(cmsui): re-add control panel list class hooks for theming
1 parent fd0c62d commit c33b599

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

packages/cmsui/components/ControlPanel/ControlPanelsList.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ interface ControlPanel {
2727

2828
type IconComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
2929

30-
/** Best-effort icon per control panel, matched on its id; falls back to a gear. */
3130
const iconFor = (id: string): IconComponent => {
3231
if (/date|time|calendar/.test(id)) return Calendar;
3332
if (/lang|translation|multilingual/.test(id)) return Language;
@@ -131,13 +130,13 @@ export const ControlPanelsList = ({
131130
);
132131

133132
return (
134-
<div className="flex flex-col gap-10">
133+
<div className="controlpanels-container controlpanels flex flex-col gap-10">
135134
{Object.entries(groupedPanels).map(([group, panels]) => (
136-
<section key={group}>
137-
<h2 className="cp-group-title mb-4">{group}</h2>
135+
<section key={group} className="controlpanels-group">
136+
<h2 className="group-title cp-group-title mb-4">{group}</h2>
138137
<ul
139138
className={`
140-
grid list-none grid-cols-2 gap-x-6 gap-y-5 p-0
139+
controlpanels-list grid list-none grid-cols-2 gap-x-6 gap-y-5 p-0
141140
sm:grid-cols-3
142141
lg:grid-cols-4
143142
`}
@@ -147,10 +146,12 @@ export const ControlPanelsList = ({
147146
.map((panel) => {
148147
const Icon = iconFor(panel.id || '');
149148
return (
150-
<li key={panel['@id']}>
149+
<li key={panel['@id']} className="controlpanel-item">
151150
<Link
152151
href={`/controlpanel/${panel.id}`}
153-
className="group flex flex-col items-center gap-2 no-underline"
152+
className={`
153+
controlpanel-link group flex flex-col items-center gap-2 no-underline
154+
`}
154155
>
155156
<span
156157
className={`

0 commit comments

Comments
 (0)