-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
26 changed files
with
782 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ export default defineConfig({ | |
applyBaseStyles: false, | ||
}), | ||
mdx({ | ||
gfm: false, | ||
gfm: true, | ||
}), | ||
], | ||
}); |
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 was deleted.
Oops, something went wrong.
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,91 @@ | ||
--- | ||
title: Callout | ||
--- | ||
import Callout from "@/components/Callout.astro"; | ||
|
||
|
||
## Callout | ||
|
||
The `Callout` component is designed to highlight important information, warnings, errors, or successes in your application. It is a versatile alert box with customizable variants and titles. | ||
|
||
### Props | ||
|
||
**`variant`** | ||
|
||
Type: `"info" | "warning" | "danger" | "success"` | ||
|
||
Default: "info" | ||
|
||
Description: Defines the type of alert to display. The variant determines the color, icon, and default title of the alert. | ||
|
||
**`title`** | ||
|
||
Type: `string` | ||
|
||
Default: Default titles based on the variant | ||
|
||
Description: Custom title for the alert. If not provided, the default title for the specified variant will be used. | ||
|
||
### Basic Usage | ||
To use the Callout component, import it and use it in your Astro files with the desired variant and title. | ||
|
||
<Callout variant="info"> | ||
This is an info message. | ||
</Callout> | ||
|
||
<Callout variant="warning" title="Custom Warning Title"> | ||
This is a warning message with a custom title. | ||
</Callout> | ||
|
||
<Callout variant="danger"> | ||
This is a danger message. | ||
</Callout> | ||
|
||
<Callout variant="success" title="Custom Success Title"> | ||
This is a success message with a custom title. | ||
</Callout> | ||
|
||
```astro | ||
--- | ||
import Callout from './components/Callout.astro'; | ||
--- | ||
<!-- Using default title for info variant --> | ||
<Callout variant="info"> | ||
This is an info message. | ||
</Callout> | ||
<!-- Using custom title for warning variant --> | ||
<Callout variant="warning" title="Custom Warning Title"> | ||
This is a warning message with a custom title. | ||
</Callout> | ||
<!-- Using default title for danger variant --> | ||
<Callout variant="danger"> | ||
This is a danger message. | ||
</Callout> | ||
<!-- Using custom title for success variant --> | ||
<Callout variant="success" title="Custom Success Title"> | ||
This is a success message with a custom title. | ||
</Callout> | ||
``` | ||
|
||
### Default Behavior | ||
|
||
If no variant is provided, the info variant will be used by default. Similarly, if no title is provided, the default title for the specified variant will be used. | ||
|
||
<Callout> | ||
This is an info message using the default settings. | ||
</Callout> | ||
|
||
```astro | ||
--- | ||
import Callout from './components/Callout.astro'; | ||
--- | ||
<!-- Using default info variant and title --> | ||
<Callout> | ||
This is an info message using the default settings. | ||
</Callout> | ||
``` |
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,14 @@ | ||
--- | ||
title: Components | ||
--- | ||
import Callout from "@/components/Callout.astro"; | ||
|
||
Components let you easily reuse a piece of UI or styling consistently. Examples might include a link card or a YouTube embed. CelestialDocs supports the use of components in [MDX](https://mdxjs.com/) files and provides some common components for you to use. | ||
|
||
## Callout | ||
|
||
The `Callout` component is designed to highlight important information, warnings, errors, or successes in your application. It is a versatile alert box with customizable variants and titles. | ||
|
||
<Callout> | ||
See the [Callout](/custom-components/callout) for all custom props and their usages. | ||
</Callout> |
Oops, something went wrong.