Skip to content

Commit ec1ca5a

Browse files
committed
fix react dom attribute warning
1 parent c57bd03 commit ec1ca5a

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

apps/docs/src/usages/navigation/navigation-rail.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,12 @@ export default () => {
2121
}
2222
]
2323

24-
return <NavigationRail items={items} />
24+
return (
25+
<NavigationRail
26+
items={items}
27+
value={1}
28+
defaultValue={0}
29+
setValue={(value) => console.log(value)}
30+
/>
31+
)
2532
}

packages/actify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "actify",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"license": "MIT",
55
"author": "Lerte Smith",
66
"keywords": [

packages/actify/src/components/NavigationRail/NavigationRail.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,23 @@ const Item = (props: Item) => {
4141
}
4242

4343
const NavigationRail = (props: NavigationRailProps) => {
44-
const { value, defaultValue, setValue } = props
44+
const {
45+
menu,
46+
value,
47+
children,
48+
className,
49+
items = [],
50+
defaultValue,
51+
setValue,
52+
...rest
53+
} = props
54+
4555
const [activeIndex, setActiveIndex] = useControllableState({
4656
value,
4757
defaultValue,
4858
onChange: setValue
4959
})
5060

51-
const { children, className, menu, items = [], ...rest } = props
5261
return (
5362
<div {...rest} className={clsx(styles['root'], className)}>
5463
{/* Menu icon (optional) */}

0 commit comments

Comments
 (0)