diff --git a/src/client/editor/Editor.tsx b/src/client/editor/Editor.tsx index ae5ef37..fb0872c 100644 --- a/src/client/editor/Editor.tsx +++ b/src/client/editor/Editor.tsx @@ -96,56 +96,61 @@ export const Editor: FC = ({
-
+ -

Snippets

-
+ Snippets +
- {snippets.map( - ({ name, label, icon: Icon, snippet }, index) => ( - onAddSnippet(name, snippet)} - > - - {label} - - ), - )} + {snippets.map(({ name, label, icon: Icon, snippet }) => ( + onAddSnippet(name, snippet)} + > + + {label} + + ))}
-
+ -

Examples

-
+ Example +
- {Object.entries(examples).map(([slug, title]) => { - const href = `${window.location.origin}/parameters/example/${slug}`; - return ( - - - - {" "} - (link opens in new tab) - - - {title} - - - ); - })} + {Object.entries(examples) + .sort(([_slugA, titleA], [_slugB, titleB]) => { + return titleA.localeCompare(titleB) + }) + .map(([slug, title]) => { + const href = `${window.location.origin}/parameters/example/${slug}`; + return ( + + + + {title} + + {" "} + (link opens in new tab) + + + + ); + })}