mirror of
https://github.com/supabase/supabase.git
synced 2026-07-05 04:14:46 +08:00
25 lines
443 B
TypeScript
25 lines
443 B
TypeScript
type params = { name: string; description: string; tabs: string; note: string; }
|
|
|
|
const Example = ({name, description = '', tabs = '', note = ''}: params) => {
|
|
if (note !== '') {
|
|
const [noteTitle, ...noteText] = note.split('\n');
|
|
console.log(noteText);
|
|
note = `
|
|
:::note ${noteTitle}
|
|
${noteText.join('\n')}
|
|
:::
|
|
`;
|
|
}
|
|
return `
|
|
### ${name}
|
|
|
|
${description}
|
|
|
|
${tabs}
|
|
|
|
${note}
|
|
`.trim()
|
|
}
|
|
|
|
export default Example
|