diff options
author | 2021-12-22 16:11:05 -0500 | |
---|---|---|
committer | 2021-12-22 16:11:05 -0500 | |
commit | 6ddd7678ffb6598ae6e263706813cb5e94535f02 (patch) | |
tree | d4b45f7590b59c3574bd6593b17d8066f71007c6 /examples/framework-react/src/components/Counter.jsx | |
parent | 305ce4182fbe89abcfb88008ddce178bd8863b6a (diff) | |
download | astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.gz astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.zst astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.zip |
Use accessible indentation (#2253)
Diffstat (limited to 'examples/framework-react/src/components/Counter.jsx')
-rw-r--r-- | examples/framework-react/src/components/Counter.jsx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/framework-react/src/components/Counter.jsx b/examples/framework-react/src/components/Counter.jsx index e222d680f..97ddf34c7 100644 --- a/examples/framework-react/src/components/Counter.jsx +++ b/examples/framework-react/src/components/Counter.jsx @@ -2,18 +2,18 @@ import React, { useState } from 'react'; import './Counter.css'; export default function Counter({ children, count: initialCount }) { - const [count, setCount] = useState(initialCount); - const add = () => setCount((i) => i + 1); - const subtract = () => setCount((i) => i - 1); + const [count, setCount] = useState(initialCount); + const add = () => setCount((i) => i + 1); + const subtract = () => setCount((i) => i - 1); - return ( - <> - <div className="counter"> - <button onClick={subtract}>-</button> - <pre>{count}</pre> - <button onClick={add}>+</button> - </div> - <div className="counter-message">{children}</div> - </> - ); + return ( + <> + <div className="counter"> + <button onClick={subtract}>-</button> + <pre>{count}</pre> + <button onClick={add}>+</button> + </div> + <div className="counter-message">{children}</div> + </> + ); } |