insomnia/packages/insomnia-components/components/sidebar/sidebar-text-item.js
Mike Ellan 74a3967fce
Auto focus filter and improve click targets in design sidebar (#2617)
* Set cursor focus on active filter

* Click targets and info panel fix

Fixing inconsistently treated click targets and info panel items.

* Font (for SVGs) sizing and layout fixes.

* Layout & alignment fixes

* Update packages/insomnia-components/components/sidebar/sidebar-info.js

Co-authored-by: Opender Singh <opender94@gmail.com>

* Spacing increase on first child elment in panel, click specificity

Co-authored-by: Opender Singh <opender94@gmail.com>
2020-09-16 11:11:42 -04:00

26 lines
516 B
JavaScript

// @flow
import * as React from 'react';
import styled from 'styled-components';
type Props = {
label: string,
headline: string,
};
const StyledTextItem: React.ComponentType<{}> = styled.span`
display: block;
padding-left: var(--padding-sm);
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`;
const SidebarTextItem = ({ label, headline }: Props) => (
<StyledTextItem>
<strong>{label}</strong>
<span>{headline}</span>
</StyledTextItem>
);
export default SidebarTextItem;