Skip to content

Commit b8bdb1b

Browse files
committed
poc: add Panel footer
1 parent d7c8263 commit b8bdb1b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

examples/react/css/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function App() {
4242
<Configure hitsPerPage={8} snippetEllipsisText="…" />
4343
<div className="container two-columns">
4444
<div className="left-column">
45-
<Panel header="categories">
45+
<Panel header="categories" footer="This is a footer">
4646
<HierarchicalMenu
4747
attributes={[
4848
'hierarchicalCategories.lvl0',

examples/react/css/src/Panel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import React from 'react';
22

33
type PanelProps = React.PropsWithChildren<{
44
header: string;
5+
footer?: React.ReactNode;
56
}>;
67

7-
export function Panel({ header, children }: PanelProps) {
8+
export function Panel({ header, children, footer }: PanelProps) {
89
return (
910
<div className="ais-Panel">
1011
<div className="ais-Panel-header">
1112
<span>{header}</span>
1213
</div>
1314
<div className="ais-Panel-body">{children}</div>
15+
<div className="ais-Panel-footer">{footer}</div>
1416
</div>
1517
);
1618
}

examples/react/css/src/panel.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
font-weight: var(--ais-font-weight-medium);
99
text-transform: capitalize;
1010
}
11+
12+
.ais-Panel-footer {
13+
margin-top: calc(var(--ais-spacing) * 0.5);
14+
font-size: 0.9em;
15+
}

0 commit comments

Comments
 (0)