VD-151: Various styling fixes

This commit is contained in:
Wouter van den Hoven 2020-07-02 14:34:10 +02:00
parent a084f3a041
commit 422123135c
4 changed files with 4 additions and 20 deletions

View File

@ -19,7 +19,7 @@ export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> {
const logo = <LogoImgEl src={logoInfo.url} alt={altText} />;
return (
<LogoWrap style={{ backgroundColor: logoInfo.backgroundColor }}>
<LogoWrap style={{ backgroundColor: logoInfo.backgroundColor, padding: '25px 0 20px 0' }}>
{logoHref ? LinkWrap(logoHref)(logo) : logo}
</LogoWrap>
);

View File

@ -12,7 +12,6 @@ import { SideMenu } from '../SideMenu/SideMenu';
import { StickyResponsiveSidebar } from '../StickySidebar/StickyResponsiveSidebar';
import { ApiContentWrap, BackgroundStub, RedocWrap } from './styled.elements';
import { SearchBox } from '../SearchBox/SearchBox';
import { StoreProvider } from '../StoreBuilder';
export interface RedocProps {
@ -34,7 +33,7 @@ export class Redoc extends React.Component<RedocProps> {
render() {
const {
store: { spec, menu, options, search, marker },
store: { spec, menu, options },
} = this.props;
const store = this.props.store;
return (
@ -44,15 +43,6 @@ export class Redoc extends React.Component<RedocProps> {
<RedocWrap className="redoc-wrap">
<StickyResponsiveSidebar menu={menu} className="menu-content">
<ApiLogo info={spec.info} />
{(!options.disableSearch && (
<SearchBox
search={search!}
marker={marker}
getItemById={menu.getItemById}
onActivate={menu.activateAndScroll}
/>
)) ||
null}
<SideMenu menu={menu} />
</StickyResponsiveSidebar>
<ApiContentWrap className="api-content">

View File

@ -6,7 +6,6 @@ import { OptionsContext } from '../OptionsProvider';
import { MenuItems } from './MenuItems';
import { PerfectScrollbarWrap } from '../../common-elements/perfect-scrollbar';
import { RedocAttribution } from './styled.elements';
@observer
export class SideMenu extends React.Component<{ menu: MenuStore; className?: string }> {
@ -24,11 +23,6 @@ export class SideMenu extends React.Component<{ menu: MenuStore; className?: str
}}
>
<MenuItems items={store.items} onActivate={this.activate} root={true} />
<RedocAttribution>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/Redocly/redoc">
Documentation Powered by ReDoc
</a>
</RedocAttribution>
</PerfectScrollbarWrap>
);
}

View File

@ -4,7 +4,7 @@ const defaultTheme: ThemeInterface = {
spacing: {
unit: 5,
sectionHorizontal: ({ spacing }) => spacing.unit * 8,
sectionVertical: ({ spacing }) => spacing.unit * 8,
sectionVertical: ({ spacing }) => spacing.unit * 2,
},
breakpoints: {
small: '50rem',
@ -14,7 +14,7 @@ const defaultTheme: ThemeInterface = {
colors: {
tonalOffset: 0.3,
primary: {
main: '#32329f',
main: '#030c38',
light: ({ colors }) => lighten(colors.tonalOffset, colors.primary.main),
dark: ({ colors }) => darken(colors.tonalOffset, colors.primary.main),
contrastText: ({ colors }) => readableColor(colors.primary.main),