diff --git a/src/component/elements/dropDownButton/DropDownList.tsx b/src/component/elements/dropDownButton/DropDownList.tsx index cf104b6bc..8b21c629f 100644 --- a/src/component/elements/dropDownButton/DropDownList.tsx +++ b/src/component/elements/dropDownButton/DropDownList.tsx @@ -1,5 +1,4 @@ -/** @jsxImportSource @emotion/react */ -import { css } from '@emotion/react'; +import styled from '@emotion/styled'; import type { DropDownListItem, @@ -7,31 +6,30 @@ import type { ItemProps, } from './DropDownButton.js'; -const styles = { - ul: css` - list-style-type: none; - padding: 0; - margin: 0; - `, - li: css` - text-align: center; - white-space: nowrap; - color: black; - border-bottom: 0.55px solid #f9f9f9; +const Menu = styled.ul` + list-style-type: none; + padding: 0; + margin: 0; +`; +const MenuItem = styled.li` + text-align: center; + white-space: nowrap; + color: black; + border-bottom: 0.55px solid #f9f9f9; - &:last-of-type { - border-bottom: none; - } + &:last-of-type { + border-bottom: none; + } - &:hover { - background-color: #f6f6f6; - } - `, - label: css` - padding: 5px 20px; - display: block; - `, -}; + &:hover { + background-color: #f6f6f6; + } +`; + +const Text = styled.span` + padding: 5px 20px; + display: block; +`; interface InnerDropDownListProps extends DropDownListProps, @@ -49,10 +47,9 @@ function DropDownList({ }: InnerDropDownListProps) { return (
-
    + {data.map((item, index) => ( -
  • { e.stopPropagation(); @@ -64,12 +61,10 @@ function DropDownList({ cursor: 'pointer', }} > - {renderItem?.(item) || ( - {item[labelKey]} - )} -
  • + {renderItem?.(item) || {item[labelKey]}} + ))} -
+
); } diff --git a/src/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.tsx b/src/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.tsx index 67d4f5343..32a01a9f1 100644 --- a/src/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.tsx +++ b/src/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.tsx @@ -1,5 +1,4 @@ -/** @jsxImportSource @emotion/react */ -import { css } from '@emotion/react'; +import styled from '@emotion/styled'; import type { Correlation } from 'nmr-correlation'; import { useMemo } from 'react'; @@ -8,7 +7,7 @@ import { getLabelColor } from '../utilities/Utilities.js'; import AdditionalColumnHeader from './AdditionalColumnHeader.js'; import CorrelationTableRow from './CorrelationTableRow.js'; -const tableStyle = css` +const Container = styled.div` overflow: auto; height: 100%; display: block; @@ -131,7 +130,7 @@ function CorrelationTable({ ); return ( -
+ @@ -145,7 +144,7 @@ function CorrelationTable({ {rows}
-
+ ); } diff --git a/src/component/panels/SummaryPanel/SummaryPanel.tsx b/src/component/panels/SummaryPanel/SummaryPanel.tsx index bfaa0b21e..ab5ddad80 100644 --- a/src/component/panels/SummaryPanel/SummaryPanel.tsx +++ b/src/component/panels/SummaryPanel/SummaryPanel.tsx @@ -1,5 +1,4 @@ -/** @jsxImportSource @emotion/react */ -import { css } from '@emotion/react'; +import styled from '@emotion/styled'; import type { Correlation, Link, @@ -51,38 +50,37 @@ export type OnEditCorrelationCallback = ( options?: CorrelationOptions, ) => void; -const panelStyle = css` +const Container = styled.div` display: flex; flex-direction: column; text-align: center; height: 100%; width: 100%; +`; - .extra-header-content { - display: flex; - flex: 1; - justify-content: center; - - .overview-container { - width: 100%; - display: flex; - align-items: center; - margin-left: 10px; - } +const InnerHeader = styled.div` + display: flex; + flex: 1; + justify-content: center; +`; +const OverviewContainer = styled.div` + width: 100%; + display: flex; + align-items: center; + margin-left: 10px; +`; - .table-view-selection { - width: 100%; - display: flex; - align-items: center; - justify-content: flex-end; - margin-right: 2px; - white-space: nowrap; +const SelectionContainer = styled.div` + width: 100%; + display: flex; + align-items: center; + justify-content: flex-end; + margin-right: 2px; + white-space: nowrap; +`; - label { - font-size: 13px; - } - } - } +const SelectionLabel = styled.label` + font-size: 13px; `; const EditLinkDialog = withDialog(EditLinkModal); @@ -474,7 +472,7 @@ function SummaryPanel() { const total = correlationsData ? correlationsData.values.length : 0; return ( -
+ -
-
+ + -
-
+ + - + View: