---
import { getGistFile } from "../lib"
import { Code } from "../ExpressiveCode"
export interface Props {
/** REQUIRED: Used to define the desired GitHub Gist ID */
gistId: string;
/** REQUIRED: Used to define the desired file from the Gist */
filename: string;
/** OPTIONAL: Allows the user to Enable and Disable LineNumbers
* @default true
*/
showLineNumbers?: boolean;
/** OPTIONAL: Allows the user to Enable and Disable LineWrapping
* @default true
*/
wrap?: boolean;
}
// Extracting the Props
const { gistId, filename, wrap, showLineNumbers } = Astro.props as Props;
// Setting the Defaults
const WRAP = wrap ? wrap : wrap === undefined ? true : false;
const SLN = showLineNumbers ? showLineNumbers : showLineNumbers === undefined ? true : false;
// Fetching the Gist
const Gist = await getGistFile( gistId, filename );
---
{ Gist ? (
) : (