Adjusted styling, fixed linting warning

This commit is contained in:
Luke Hagar
2024-05-22 16:58:29 -05:00
parent 463db147ff
commit d15cd9913e
2 changed files with 7 additions and 7 deletions

View File

@@ -140,7 +140,7 @@ export const isValidPath = (path: string) => {
const pathRegex = /(\/[a-zA-Z-]+)+|\//gm;
const pathParts = pathWithoutVariables.match(pathRegex);
// the fallback is to return false if the pathParts array is null
return pathParts?.length === 1 ?? false;
return pathParts?.length === 1 ? true : false;
};
/// sorts the paths in the OpenAPI document alphabetically

View File

@@ -16,24 +16,24 @@
<Modal />
<div class="w-full h-full">
<AppBar>
<AppBar padding="p-2">
<svelte:fragment slot="lead">
<h4 class="h4">
<h1>
OpenAPI generator
<code class="ml-2 variant-filled-success p-1 px-2 rounded-container-token"> 3.1.0 </code>
</h4>
<code class="text-xs ml-2 variant-filled-success p-1 px-2 rounded-container-token"> 3.1.0 </code>
</h1>
</svelte:fragment>
<svelte:fragment slot="trail">
<a
href="https://www.speakeasyapi.dev/openapi"
target="_blank"
class="btn variant-filled-surface"
class="btn variant-filled-surface btn-sm hover:variant-filled-primary"
>
Schema Reference
</a>
<button
type="button"
class="btn variant-ringed-error hover:variant-filled-error"
class="btn variant-ringed-error btn-sm hover:variant-filled-error"
on:click={() => {
if (confirm('Are you sure you want to reset ALL current inputs?')) {
// remove `openApi` from localStorage