Fix documentation layout broken because of mixed rest api doc styles (#3043)
This commit is contained in:
@ -3,7 +3,7 @@ import BrowserOnly from "@docusaurus/BrowserOnly";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { API } from '@stoplight/elements';
|
||||
import spotlightTheme from '!css-loader!@stoplight/elements/styles.min.css';
|
||||
import './rest-api.css'
|
||||
import restApiCss from '!css-loader!./rest-api.css';
|
||||
import { parseJson } from "nx/src/utils/json";
|
||||
import { TbLoader2 } from "react-icons/tb";
|
||||
|
||||
@ -28,6 +28,14 @@ const TokenForm = ({onSubmit, isTokenValid, token, isLoading}: TokenFormProps)=>
|
||||
return () => styleElement.remove();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const styleElement = document.createElement('style');
|
||||
styleElement.innerHTML = restApiCss.toString();
|
||||
document.head.append(styleElement);
|
||||
|
||||
return () => styleElement.remove();
|
||||
}, []);
|
||||
|
||||
return !isTokenValid && (
|
||||
<div>
|
||||
<div className='container'>
|
||||
|
||||
Reference in New Issue
Block a user