-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25cfd69
commit 1fa5708
Showing
8 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script lang="ts"> | ||
import { Icons } from '$lib/assets/icons'; | ||
import * as Tooltip from '$lib/components/ui/tooltip'; | ||
import { cn } from '$lib/utils'; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
type Props = HTMLAttributes<HTMLDListElement> & { | ||
tooltip: string; | ||
content: string; | ||
}; | ||
let { | ||
title, | ||
tooltip, | ||
content, | ||
class: class_name = undefined, | ||
children, | ||
...rest | ||
}: Props = $props(); | ||
</script> | ||
|
||
<dl class={cn('grid gap-2', class_name)} {...rest}> | ||
<dt | ||
class="inline-flex min-h-[14px] items-center gap-0.5 whitespace-nowrap text-sm capitalize leading-[14px] text-gray-900" | ||
> | ||
{title} | ||
<Tooltip.Provider delayDuration={150}> | ||
<Tooltip.Root> | ||
<Tooltip.Trigger class="cursor-auto"> | ||
<Icons.InformationFillSmall /> | ||
</Tooltip.Trigger> | ||
<Tooltip.Portal> | ||
<Tooltip.Content> | ||
<p>{tooltip}</p> | ||
</Tooltip.Content> | ||
</Tooltip.Portal> | ||
</Tooltip.Root> | ||
</Tooltip.Provider> | ||
</dt> | ||
<dd class="text-sm font-medium leading-4 text-gray-1000">{content}</dd> | ||
</dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Description } from './description.svelte'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<h1>description</h1> | ||
<script lang="ts"> | ||
import Demo from '$lib/components/shared/demo.svelte'; | ||
import PageWrapper from '$lib/components/shared/page-wrapper.svelte'; | ||
import Default from './default.svelte'; | ||
import default_code from './default.svelte?raw'; | ||
let { data } = $props(); | ||
</script> | ||
|
||
<PageWrapper title={data.title} description={data.description}> | ||
<Demo id="default" code={default_code}> | ||
<Default /> | ||
</Demo> | ||
</PageWrapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { MetaTagsProps } from 'svelte-meta-tags'; | ||
|
||
export function load() { | ||
const title = 'Description'; | ||
const description = | ||
'Displays a brief heading and subheading to communicate any additional information or context a user needs to continue.'; | ||
|
||
const pageMetaTags = Object.freeze({ | ||
title, | ||
description, | ||
openGraph: { | ||
title, | ||
description | ||
} | ||
}) satisfies MetaTagsProps; | ||
|
||
return { | ||
pageMetaTags, | ||
title, | ||
description | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script lang="ts"> | ||
import { Description } from '$lib/components/ui/description'; | ||
</script> | ||
|
||
<Description | ||
title="Section Title" | ||
content="Data about this section." | ||
tooltip="Additional context about what this section refers to." | ||
/> |