Skip to content

Commit

Permalink
docs: fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
echoghi committed Feb 2, 2023
1 parent 7c9bc20 commit f4ed533
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function Demo() {
<h1>
Page loaded <b>{seconds}</b> seconds ago
</h1>
<button onClick={interval.toggle} color={interval.active ? 'red' : 'green'} variant="outline">
<button onClick={interval.toggle} style={{ color: interval.active ? 'red' : 'green' }}>
{interval.active ? 'Stop' : 'Start'} counting
</button>
</div>
Expand Down Expand Up @@ -364,7 +364,7 @@ function LaggyTimer() {
return (
<div>
<h1>It has been {seconds} seconds.</h1>
<button onClick={interval.toggle} color={interval.active ? 'red' : 'green'} variant="outline">
<button onClick={interval.toggle} style={{ color: interval.active ? 'red' : 'green' }}>
{interval.active ? 'Stop' : 'Start'} counting
</button>
</div>
Expand Down Expand Up @@ -471,7 +471,7 @@ function Demo() {
const { toggle, fullscreen } = useFullscreen();

return (
<button onClick={toggle} color={fullscreen ? 'red' : 'blue'}>
<button onClick={toggle} style={{ color: fullscreen ? 'red' : 'green' }}>
{fullscreen ? 'Exit Fullscreen' : 'Enter Fullscreen'}
</button>
);
Expand All @@ -495,7 +495,7 @@ function Demo() {
width={200}
/>

<button onClick={toggle} color={fullscreen ? 'red' : 'blue'}>
<button onClick={toggle} style={{ color: fullscreen ? 'red' : 'green' }}>
{fullscreen ? 'Exit Fullscreen' : 'View Image Fullscreen'}
</button>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export { useMediaQuery } from './useMediaQuery/useMediaQuery';
export { useWindowSize } from './useWindowSize/useWindowSize';
export { useElementSize } from './useElementSize/useElementSize';
export { useLocalStorage } from './useLocalStorage/useLocalStorage';
export { useResizeObserver } from './useElementSize/useElementSize';
export { useMousePosition } from './useMousePosition/useMousePosition';
export { useNetworkStatus } from './useNetworkStatus/useNetworkStatus';
export { useResizeObserver } from './useElementSize/useElementSize';
export { useOnClickOutside } from './useOnClickOutside/useOnClickOutside';
export { useRandomInterval } from './useRandomInterval/useRandomInterval';
export { useWindowScrollPosition } from './useWindowScrollPosition/useWindowScrollPosition';
Expand Down

0 comments on commit f4ed533

Please sign in to comment.