2
0

docs(api): 📝 Simplified API endpoints

This commit is contained in:
Baptiste Arnaud
2022-04-15 07:49:27 -07:00
parent 281fddc8ef
commit 29254f675c
8 changed files with 376 additions and 40 deletions

View File

@ -1,5 +1,6 @@
// Taken from https://github.com/plausible/docs/blob/master/src/js/api-helpers.js 💙
import React from 'react'
import { useColorMode } from '@docusaurus/theme-common'
export const Required = () => (
<span
@ -30,7 +31,8 @@ export const Optional = () => (
)
export const Tag = ({ children, color }) => {
let backgroundColor = '#CBD5E0'
const { isDarkTheme } = useColorMode()
let backgroundColor = isDarkTheme ? '#2d60b4' : '#CBD5E0'
switch (color) {
case 'green':
backgroundColor = '#68D391'