Skip to content

Commit

Permalink
Fix minor docs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
szhsin committed Jul 31, 2024
1 parent a386d7b commit 255664b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/src/components/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const Example = React.memo(
</div>

{sourceCode && (
<pre className={bem(blockName, 'source')}>
<pre key={sourceCode.length} className={bem(blockName, 'source')}>
<code className="lang-jsx">{sourceCode}</code>
</pre>
)}
Expand Down
6 changes: 3 additions & 3 deletions example/src/data/codeExamples.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const basicMenu = {

fullSource: `import { Menu, MenuItem, MenuButton } from '@szhsin/react-menu';
import '@szhsin/react-menu/dist/index.css';
import '@szhsin/react-menu/dist/transitions/slide.css';
import '@szhsin/react-menu/dist/transitions/zoom.css';
export default function Example() {
return (
Expand Down Expand Up @@ -955,7 +955,7 @@ export const menuStateHook = {
fullSource: `import { useRef } from 'react';
import { ControlledMenu, MenuItem, useClick, useMenuState } from '@szhsin/react-menu';
import '@szhsin/react-menu/dist/index.css';
import '@szhsin/react-menu/dist/transitions/slide.css';
import '@szhsin/react-menu/dist/transitions/zoom.css';
export default function () {
const ref = useRef(null);
Expand Down Expand Up @@ -1005,7 +1005,7 @@ export const hoverMenu = {
fullSource: `import { useRef, useState } from 'react';
import { ControlledMenu, MenuItem, useHover, useMenuState } from '@szhsin/react-menu';
import '@szhsin/react-menu/dist/index.css';
import '@szhsin/react-menu/dist/transitions/slide.css';
import '@szhsin/react-menu/dist/transitions/zoom.css';
const HoverMenu = () => {
const ref = useRef(null);
Expand Down

0 comments on commit 255664b

Please sign in to comment.