Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed May 26, 2021
1 parent 34ff601 commit f5d9e49
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import React, { useMemo, useCallback, useState } from 'react';
import type { ReactNode, FunctionComponent, ChangeEvent } from 'react';
import sytled from 'styled-components';
import sytled, { useTheme } from 'styled-components';

import {
EuiFlexGroup,
Expand All @@ -27,6 +27,8 @@ import {
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';

import type { EuiTheme } from '../../../../../../../../src/plugins/kibana_react/common';

interface Props {
id: string;
value: string[];
Expand Down Expand Up @@ -66,6 +68,7 @@ const SortableTextField: FunctionComponent<SortableTextFieldProps> = React.memo(
}, [onDelete, index]);

const isInvalid = (errors?.length ?? 0) > 0;
const theme = useTheme() as EuiTheme;

return (
<EuiDraggable
Expand All @@ -83,7 +86,11 @@ const SortableTextField: FunctionComponent<SortableTextFieldProps> = React.memo(
alignItems="center"
gutterSize="none"
responsive={false}
style={state.isDragging ? { background: '#fff' } : {}}
style={
state.isDragging
? { background: theme.eui.euiPanelBackgroundColorModifiers.plain }
: {}
}
>
<EuiFlexItem grow={false}>
<DraggableDiv
Expand Down Expand Up @@ -229,7 +236,6 @@ export const HostsInput: FunctionComponent<Props> = ({
))}
</EuiDroppable>
</EuiDragDropContext>
{globalErrors}
{displayErrors(globalErrors)}
<EuiSpacer size="m" />
<EuiButtonEmpty size="xs" flush="left" iconType="plusInCircle" onClick={addRowHandler}>
Expand Down

0 comments on commit f5d9e49

Please sign in to comment.