From 6ddd7678ffb6598ae6e263706813cb5e94535f02 Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Wed, 22 Dec 2021 16:11:05 -0500 Subject: Use accessible indentation (#2253) --- .../framework-react/src/components/Counter.css | 12 ++--- .../framework-react/src/components/Counter.jsx | 26 +++++------ examples/framework-react/src/pages/index.astro | 51 +++++++++++----------- 3 files changed, 45 insertions(+), 44 deletions(-) (limited to 'examples/framework-react/src') diff --git a/examples/framework-react/src/components/Counter.css b/examples/framework-react/src/components/Counter.css index 5d3de4803..fb21044d7 100644 --- a/examples/framework-react/src/components/Counter.css +++ b/examples/framework-react/src/components/Counter.css @@ -1,11 +1,11 @@ .counter { - display: grid; - font-size: 2em; - grid-template-columns: repeat(3, minmax(0, 1fr)); - margin-top: 2em; - place-items: center; + display: grid; + font-size: 2em; + grid-template-columns: repeat(3, minmax(0, 1fr)); + margin-top: 2em; + place-items: center; } .counter-message { - text-align: center; + text-align: center; } 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 ( - <> -
- -
{count}
- -
-
{children}
- - ); + return ( + <> +
+ +
{count}
+ +
+
{children}
+ + ); } diff --git a/examples/framework-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro index dd2950782..39a15a797 100644 --- a/examples/framework-react/src/pages/index.astro +++ b/examples/framework-react/src/pages/index.astro @@ -1,34 +1,35 @@ --- // Component Imports -import Counter from '../components/Counter.jsx' +import Counter from '../components/Counter.jsx'; const someProps = { - count: 0, -} + count: 0, +}; // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ --- + - - - - - - - -
- -

Hello, React!

-
-
- + + + + + + + +
+ +

Hello, React!

+
+
+ -- cgit v1.2.3