Skip to content

Commit 3abc6bd

Browse files
committed
More configurable dropdown and slidepanel
1 parent e334f18 commit 3abc6bd

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,27 @@
6363
"react-dom": "18.3.1"
6464
},
6565
"devDependencies": {
66-
"@eslint/js": "9.30.1",
67-
"@storybook/react-vite": "9.0.15",
66+
"@eslint/js": "9.32.0",
67+
"@storybook/react-vite": "9.0.18",
6868
"@testing-library/react": "16.3.0",
69-
"@types/node": "24.0.10",
69+
"@types/node": "24.1.0",
7070
"@types/react": "19.1.8",
7171
"@types/react-dom": "19.1.6",
72-
"@vitejs/plugin-react": "4.6.0",
72+
"@vitejs/plugin-react": "4.7.0",
7373
"@vitest/coverage-v8": "3.2.4",
74-
"eslint": "9.30.1",
74+
"eslint": "9.32.0",
7575
"eslint-plugin-react": "7.37.5",
7676
"eslint-plugin-react-hooks": "5.2.0",
7777
"eslint-plugin-react-refresh": "0.4.20",
78-
"eslint-plugin-storybook": "9.0.15",
78+
"eslint-plugin-storybook": "9.0.18",
7979
"globals": "16.3.0",
8080
"jsdom": "26.1.0",
8181
"nodemon": "3.1.10",
8282
"npm-run-all": "4.1.5",
83-
"storybook": "9.0.15",
83+
"storybook": "9.0.18",
8484
"typescript": "5.8.3",
85-
"typescript-eslint": "8.35.1",
86-
"vite": "7.0.1",
85+
"typescript-eslint": "8.38.0",
86+
"vite": "7.0.6",
8787
"vitest": "3.2.4"
8888
},
8989
"eslintConfig": {

src/components/Dropdown/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cn } from '../../lib/utils'
33
import styles from './Dropdown.module.css'
44

55
interface DropdownProps {
6-
label?: string
6+
label?: ReactNode
77
align?: 'left' | 'right'
88
className?: string
99
children: ReactNode

src/components/SlidePanel/SlidePanel.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ interface SlidePanelProps {
77
mainContent: ReactNode
88
panelContent: ReactNode
99
isPanelOpen: boolean
10+
className?: string
1011
}
1112

1213
const WIDTH = {
@@ -17,7 +18,7 @@ const WIDTH = {
1718
/**
1819
* Slide out panel component with resizing.
1920
*/
20-
export default function SlidePanel({ mainContent, panelContent, isPanelOpen }: SlidePanelProps) {
21+
export default function SlidePanel({ mainContent, panelContent, isPanelOpen, className }: SlidePanelProps) {
2122
const { slidePanel, customClass } = useConfig()
2223
const minWidth = slidePanel?.minWidth && slidePanel.minWidth > 0 ? slidePanel.minWidth : WIDTH.MIN
2324
function validWidth(width?: number): number | undefined {
@@ -81,7 +82,7 @@ export default function SlidePanel({ mainContent, panelContent, isPanelOpen }: S
8182
}, [panelWidth, isPanelOpen])
8283

8384
return (
84-
<div className={cn(styles.slidePanel, customClass?.slidePanel)}>
85+
<div className={cn(styles.slidePanel, customClass?.slidePanel, className)}>
8586
<article>
8687
{mainContent}
8788
</article>

0 commit comments

Comments
 (0)