-
Notifications
You must be signed in to change notification settings - Fork 225
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
Showing
8 changed files
with
381 additions
and
8 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
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
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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
--- | ||
title: Embed | ||
sidebar_position: 1 | ||
--- | ||
|
||
Use the `Embed` component to display external content, such as videos, maps, or other embeddable media, within your markdown pages. This component allows you to customize dimensions, add borders, and ensure responsive styling. | ||
|
||
## Default usage | ||
|
||
<DocTab> | ||
<div slot='preview'> | ||
<Embed | ||
url="https://www.youtube.com/embed/UiCioBZ5IDU?si=dychrQurRTlhz9DN" | ||
title="Sample Video" | ||
/> | ||
</div> | ||
|
||
```markdown | ||
<Embed | ||
url="https://www.youtube.com/embed/UiCioBZ5IDU?si=dychrQurRTlhz9DN" | ||
title="Sample Video" | ||
/> | ||
``` | ||
</DocTab> | ||
|
||
### Custom size | ||
|
||
<DocTab> | ||
<div slot='preview'> | ||
<Embed | ||
url="https://www.youtube.com/embed/UiCioBZ5IDU?si=dychrQurRTlhz9DN" | ||
title="Sample Video" | ||
height="200" | ||
width=400 | ||
align=center | ||
/> | ||
</div> | ||
|
||
```markdown | ||
<Embed | ||
url="https://www.youtube.com/embed/UiCioBZ5IDU?si=dychrQurRTlhz9DN" | ||
title="Sample Video" | ||
width=800 | ||
height=450 | ||
/> | ||
``` | ||
</DocTab> | ||
|
||
### No border | ||
|
||
<DocTab> | ||
<div slot='preview'> | ||
<Embed | ||
url="https://www.youtube.com/embed/UiCioBZ5IDU?si=dychrQurRTlhz9DN" | ||
title="Sample Video" | ||
border=false | ||
/> | ||
</div> | ||
|
||
```markdown | ||
<Embed | ||
url="https://www.youtube.com/embed/UiCioBZ5IDU?si=dychrQurRTlhz9DN" | ||
title="Sample Video" | ||
border=false | ||
/> | ||
``` | ||
</DocTab> | ||
|
||
## Options | ||
|
||
<PropListing | ||
name="url" | ||
required={true} | ||
> | ||
The URL of the embeddable content. | ||
</PropListing> | ||
|
||
<PropListing | ||
name="title" | ||
defaultValue="" | ||
> | ||
A description or title for the embed, useful for accessibility purposes. | ||
</PropListing> | ||
|
||
<PropListing | ||
name="width" | ||
defaultValue="100%" | ||
options="number" | ||
> | ||
The width of the embed (in pixels). | ||
</PropListing> | ||
|
||
<PropListing | ||
name="height" | ||
defaultValue="400" | ||
options="number" | ||
> | ||
The height of the embed (in pixels). | ||
</PropListing> | ||
|
||
<PropListing | ||
name="border" | ||
defaultValue="true" | ||
options={['true', 'false']} | ||
> | ||
Whether to display a border around the embed | ||
</PropListing> | ||
|
||
<PropListing | ||
name="class" | ||
> | ||
Pass custom classes to control the styling of the embed wrapper. Supports [Tailwind classes](https://tailwindcss.com). | ||
</PropListing> |
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,118 @@ | ||
--- | ||
title: Image | ||
sidebar_position: 1 | ||
--- | ||
|
||
<Alert status=info> | ||
|
||
Note that you can also use [markdown syntax for images](/reference/markdown/#images). This component is useful when you need to customize the dimensions or styling of the image. | ||
</Alert> | ||
|
||
|
||
The `Image` component allows you to add responsive and styled images to your markdown pages. This component is useful for embedding images with optional alignment, width, and height settings, and includes accessibility features through the description attribute. | ||
|
||
## Examples | ||
|
||
### Custom size | ||
<DocTab> | ||
<div slot='preview'> | ||
<Image url="https://raw.githubusercontent.com/evidence-dev/media-kit/refs/heads/main/png/wordmark-gray-800.png" description="Sample placeholder image"height="80" /> | ||
</div> | ||
|
||
```markdown | ||
<Image | ||
url="https://raw.githubusercontent.com/evidence-dev/media-kit/refs/heads/main/png/wordmark-gray-800.png" | ||
description="Sample placeholder image" | ||
height=80 | ||
/> | ||
``` | ||
</DocTab> | ||
|
||
### Aligned Left | ||
<DocTab> | ||
<div slot='preview'> | ||
<Image url="https://raw.githubusercontent.com/evidence-dev/media-kit/refs/heads/main/png/wordmark-gray-800.png" description="Sample placeholder image"height="80" align=left/> | ||
</div> | ||
|
||
```markdown | ||
<Image | ||
url="https://raw.githubusercontent.com/evidence-dev/media-kit/refs/heads/main/png/wordmark-gray-800.png" | ||
description="Sample placeholder image" | ||
height=80 | ||
align="left" | ||
/> | ||
``` | ||
</DocTab> | ||
|
||
### With Border & Custom Padding | ||
<DocTab> | ||
<div slot='preview'> | ||
<Image url="https://raw.githubusercontent.com/evidence-dev/media-kit/refs/heads/main/png/wordmark-gray-800.png" description="Sample placeholder image"height="80" border=true class="p-4"/> | ||
</div> | ||
|
||
```markdown | ||
<Image | ||
url="https://raw.githubusercontent.com/evidence-dev/media-kit/refs/heads/main/png/wordmark-gray-800.png" | ||
description="Sample placeholder image" | ||
height=80 | ||
border=true | ||
class="p-4" | ||
/> | ||
``` | ||
</DocTab> | ||
|
||
## Options | ||
|
||
<PropListing | ||
name="url" | ||
required={true} | ||
> | ||
The URL of the image. | ||
</PropListing> | ||
|
||
<PropListing | ||
name="description" | ||
defaultValue="" | ||
> | ||
The description of the image for accessibility purposes. | ||
</PropListing> | ||
|
||
<PropListing | ||
name="width" | ||
defaultValue="" | ||
options="number" | ||
> | ||
The width of the image (in pixels) | ||
</PropListing> | ||
|
||
<PropListing | ||
name="height" | ||
defaultValue="" | ||
options="number" | ||
> | ||
The height of the image (in pixels) | ||
</PropListing> | ||
|
||
<PropListing | ||
name="border" | ||
defaultValue="false" | ||
options={['true', 'false']} | ||
> | ||
Whether to display a border around the image | ||
</PropListing> | ||
|
||
<PropListing | ||
name="align" | ||
options={['center', 'left', 'right']} | ||
defaultValue="center" | ||
> | ||
The alignment of the image | ||
</PropListing> | ||
|
||
<PropListing | ||
name="class" | ||
> | ||
Pass custom classes to control the styling of an accordion item. Supports [tailwind classes](https://tailwindcss.com). | ||
|
||
</PropListing> |
Oops, something went wrong.