mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
784357f089
* Lifting path clicked up to sidebar root * Abstracting out path click to story (and app) * Adding click to scroll, updating sidebar components * Scroll fix for sidebar * Cleaning up log * PR feedback * PR Feedback, fix schemas & request body rendering * PR feedback & cleanup * Prop value checking, selection positioning * Pulling remote import * Styled components into insomnia-app, obj destructuring, typing * Refactoring item path mapping * Abstracting the mapping of specs for position, bumping down styled components version. * Directly passing ... rest args initial work * Pulling logs, removing array concatenation * Pulling click handler out of render method * Rolling position mapping into scroll positining method * Opening up type, could be number/string/array * Update package-lock.json * Grabbing height from window, typing API vars, checking path * Creating scroll method dedicated to design mode * Moving typing of spec related content to Props def. * Type checking on sections, invalid section component
19 lines
481 B
JavaScript
19 lines
481 B
JavaScript
// @flow
|
|
import * as React from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
type Props = {
|
|
name: string,
|
|
};
|
|
|
|
const StyledInvalidSection: React.ComponentType<{}> = styled.div`
|
|
padding: var(--padding-xs) var(--padding-xs) var(--padding-md) var(--padding-md);
|
|
color: var(--color-warning);
|
|
`;
|
|
|
|
const SidebarInvalidSection = ({ name }: Props) => (
|
|
<StyledInvalidSection>Error: Invalid {name} specification.</StyledInvalidSection>
|
|
);
|
|
|
|
export default SidebarInvalidSection;
|