summaryrefslogtreecommitdiff
path: root/examples/docs/src/components/Header/LanguageSelect.tsx
diff options
context:
space:
mode:
authorGravatar Jonathan Neal <jonathantneal@hotmail.com> 2021-12-22 16:11:05 -0500
committerGravatar GitHub <noreply@github.com> 2021-12-22 16:11:05 -0500
commit6ddd7678ffb6598ae6e263706813cb5e94535f02 (patch)
treed4b45f7590b59c3574bd6593b17d8066f71007c6 /examples/docs/src/components/Header/LanguageSelect.tsx
parent305ce4182fbe89abcfb88008ddce178bd8863b6a (diff)
downloadastro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.gz
astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.tar.zst
astro-6ddd7678ffb6598ae6e263706813cb5e94535f02.zip
Use accessible indentation (#2253)
Diffstat (limited to 'examples/docs/src/components/Header/LanguageSelect.tsx')
-rw-r--r--examples/docs/src/components/Header/LanguageSelect.tsx58
1 files changed, 29 insertions, 29 deletions
diff --git a/examples/docs/src/components/Header/LanguageSelect.tsx b/examples/docs/src/components/Header/LanguageSelect.tsx
index 8b9807fe8..7fd3af229 100644
--- a/examples/docs/src/components/Header/LanguageSelect.tsx
+++ b/examples/docs/src/components/Header/LanguageSelect.tsx
@@ -4,35 +4,35 @@ import './LanguageSelect.css';
import { KNOWN_LANGUAGES, langPathRegex } from '../../languages';
const LanguageSelect: FunctionalComponent<{ lang: string }> = ({ lang }) => {
- return (
- <div class="language-select-wrapper">
- <svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 88.6 77.3" height="1.2em" width="1.2em">
- <path fill="currentColor" d="M61,24.6h7.9l18.7,51.6h-7.7l-5.4-15.5H54.3l-5.6,15.5h-7.2L61,24.6z M72.6,55l-8-22.8L56.3,55H72.6z" />
- <path
- fill="currentColor"
- d="M53.6,60.6c-10-4-16-9-22-14c0,0,1.3,1.3,0,0c-6,5-20,13-20,13l-4-6c8-5,10-6,19-13c-2.1-1.9-12-13-13-19h8 c4,9,10,14,10,14c10-8,10-19,10-19h8c0,0-1,13-12,24l0,0c5,5,10,9,19,13L53.6,60.6z M1.6,16.6h56v-8h-23v-7h-9v7h-24V16.6z"
- />
- </svg>
- <select
- class="language-select"
- value={lang}
- onChange={(e) => {
- const newLang = e.target.value;
- let actualDest = window.location.pathname.replace(langPathRegex, '/');
- if (actualDest == '/') actualDest = `/introduction`;
- window.location.pathname = '/' + newLang + actualDest;
- }}
- >
- {Object.keys(KNOWN_LANGUAGES).map((key) => {
- return (
- <option value={KNOWN_LANGUAGES[key]}>
- <span>{key}</span>
- </option>
- );
- })}
- </select>
- </div>
- );
+ return (
+ <div class="language-select-wrapper">
+ <svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 88.6 77.3" height="1.2em" width="1.2em">
+ <path fill="currentColor" d="M61,24.6h7.9l18.7,51.6h-7.7l-5.4-15.5H54.3l-5.6,15.5h-7.2L61,24.6z M72.6,55l-8-22.8L56.3,55H72.6z" />
+ <path
+ fill="currentColor"
+ d="M53.6,60.6c-10-4-16-9-22-14c0,0,1.3,1.3,0,0c-6,5-20,13-20,13l-4-6c8-5,10-6,19-13c-2.1-1.9-12-13-13-19h8 c4,9,10,14,10,14c10-8,10-19,10-19h8c0,0-1,13-12,24l0,0c5,5,10,9,19,13L53.6,60.6z M1.6,16.6h56v-8h-23v-7h-9v7h-24V16.6z"
+ />
+ </svg>
+ <select
+ class="language-select"
+ value={lang}
+ onChange={(e) => {
+ const newLang = e.target.value;
+ let actualDest = window.location.pathname.replace(langPathRegex, '/');
+ if (actualDest == '/') actualDest = `/introduction`;
+ window.location.pathname = '/' + newLang + actualDest;
+ }}
+ >
+ {Object.keys(KNOWN_LANGUAGES).map((key) => {
+ return (
+ <option value={KNOWN_LANGUAGES[key]}>
+ <span>{key}</span>
+ </option>
+ );
+ })}
+ </select>
+ </div>
+ );
};
export default LanguageSelect;
n error locationGravatar Jarred Sumner 2-3/+11 2021-10-23Support string-only definesGravatar Jarred Sumner 1-53/+65 2021-10-23[`.env` loader] Parse values as JavaScript string literals instead of JSONGravatar Jarred Sumner 1-52/+170 2021-10-23Add "process.env" to global objectGravatar Jarred Sumner 4-18/+36 2021-10-23Rewrite the CodepointIterator to fix some bugsGravatar Jarred Sumner 1-81/+89 2021-10-23[Lexer] Improve lexing performance by 2% via a bitfield for checking identifi...Gravatar Jarred Sumner 3-2317/+7178 2021-10-23[Bun.js] Escape unicode identifiers. This is necessary because we load source...Gravatar Jarred Sumner 1-18/+81 2021-10-23[Bun.js] Add `Bun.env` and support `process.env` for non-transpiled environme...Gravatar Jarred Sumner 1-2/+129 2021-10-21[lexer] `0x200C` and `0x200D` are valid ID_Continue charactersGravatar Jarred Sumner 1-6/+29 2021-10-21Split tests into separate .json fileGravatar Jarred Sumner 1-22/+1