Skip to content

Commit

Permalink
feat: integrate utah design system package
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Apr 29, 2024
1 parent 941d515 commit 289629a
Show file tree
Hide file tree
Showing 8 changed files with 323 additions and 42 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"isbot",
"packagejson",
"tailwindcss",
"typecheck"
"typecheck",
"utds"
]
}
54 changes: 25 additions & 29 deletions app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
import Graphic from '@arcgis/core/Graphic';
import type { MetaFunction } from '@remix-run/node';
import { useState } from 'react';
import Sherlock, {
LocatorSuggestProvider,
} from 'utah-design-system/src/Sherlock';

export const meta: MetaFunction = () => {
return [
{ title: 'New Remix App' },
{ name: 'description', content: 'Welcome to Remix!' },
{ title: 'Utah Address Verification' },
{
name: 'description',
content: 'Verify addresses within the State of Utah',
},
];
};

export default function Index() {
const url: string =
'https://masquerade.ugrc.utah.gov/arcgis/rest/services/UtahLocator/GeocodeServer';
const [matches, setMatches] = useState<Graphic[] | null>(null);

return (
<div style={{ fontFamily: 'system-ui, sans-serif', lineHeight: '1.8' }}>
<h1>Welcome to Remix</h1>
<ul>
<li>
<a
target="_blank"
href="https://remix.run/tutorials/blog"
rel="noreferrer"
>
15m Quickstart Blog Tutorial
</a>
</li>
<li>
<a
target="_blank"
href="https://remix.run/tutorials/jokes"
rel="noreferrer"
>
Deep Dive Jokes App Tutorial
</a>
</li>
<li>
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
Remix Docs
</a>
</li>
</ul>
<div className="p-10 font-sans">
<Sherlock
label="Locator Suggestion"
maxResultsToDisplay={5}
onSherlockMatch={(matches: Graphic[]) => setMatches(matches)}
placeHolder="search by address..."
provider={new LocatorSuggestProvider(url, 3857)}
/>
<pre className="max-h-64 overflow-auto">
{JSON.stringify(matches, null, ' ')}
</pre>
</div>
);
}
7 changes: 4 additions & 3 deletions app/tailwind.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
@import 'utah-design-system/src/index.css';
Loading

0 comments on commit 289629a

Please sign in to comment.