Skip to content

Commit

Permalink
Merge pull request #74 from h-kanazawa/fix-demo
Browse files Browse the repository at this point in the history
Fix demo
  • Loading branch information
h-kanazawa authored Feb 3, 2023
2 parents 7c40509 + f2e5fdb commit eeecc53
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 23 deletions.
15 changes: 0 additions & 15 deletions demo/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ import './App.css';
const repoURL = 'https://github.com/h-kanazawa/react-detectable-overflow';
const demoURL = 'https://github.com/h-kanazawa/react-detectable-overflow/tree/master/demo/src/App.js';

const SampleComponent = () => {
const [value, setValue] = useState('short a a a a a a ');

return (
<DetectableOverflow
onChange={(overflow) => setValue(overflow ? 'short' : 'loooooooooooooooooooooooooooooooooooooong')}
style={{ width: '120px' }}
>
a {value}
</DetectableOverflow>
);
};

// Demo using useOverflowDetector hook
const HookDemo = ({ input, width }) => {
const onChangeOverflow = useCallback((overflow) => {
Expand Down Expand Up @@ -141,8 +128,6 @@ const App = () => {
<HookDemo input={input} width={width} />

<ClassicClassDemo input={input} width={width} />

<SampleComponent />
</div>
</React.StrictMode>
);
Expand Down
6 changes: 3 additions & 3 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"files": {
"main.css": "/react-detectable-overflow/static/css/main.81293a4f.css",
"main.js": "/react-detectable-overflow/static/js/main.856c9e36.js",
"main.js": "/react-detectable-overflow/static/js/main.73316c82.js",
"index.html": "/react-detectable-overflow/index.html",
"main.81293a4f.css.map": "/react-detectable-overflow/static/css/main.81293a4f.css.map",
"main.856c9e36.js.map": "/react-detectable-overflow/static/js/main.856c9e36.js.map"
"main.73316c82.js.map": "/react-detectable-overflow/static/js/main.73316c82.js.map"
},
"entrypoints": [
"static/css/main.81293a4f.css",
"static/js/main.856c9e36.js"
"static/js/main.73316c82.js"
]
}
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><title>React Detectable Overflow</title><script defer="defer" src="/react-detectable-overflow/static/js/main.856c9e36.js"></script><link href="/react-detectable-overflow/static/css/main.81293a4f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><title>React Detectable Overflow</title><script defer="defer" src="/react-detectable-overflow/static/js/main.73316c82.js"></script><link href="/react-detectable-overflow/static/css/main.81293a4f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

0 comments on commit eeecc53

Please sign in to comment.