Skip to content

Commit

Permalink
Rename datasource Layout prop to onCancel
Browse files Browse the repository at this point in the history
Prior feedback from: elastic#68955 (comment)
  • Loading branch information
paul-tavares committed Jun 23, 2020
1 parent 572d006 commit 38e99d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import { CreateDatasourceFrom } from '../types';
export const CreateDatasourcePageLayout: React.FunctionComponent<{
from: CreateDatasourceFrom;
cancelUrl: string;
cancelOnClick?: React.ReactEventHandler;
onCancel?: React.ReactEventHandler;
agentConfig?: AgentConfig;
packageInfo?: PackageInfo;
'data-test-subj'?: string;
}> = ({
from,
cancelUrl,
cancelOnClick,
onCancel,
agentConfig,
packageInfo,
children,
Expand All @@ -45,7 +45,7 @@ export const CreateDatasourcePageLayout: React.FunctionComponent<{
iconType="arrowLeft"
flush="left"
href={cancelUrl}
onClick={cancelOnClick}
onClick={onCancel}
data-test-subj={`${dataTestSubj}_cancelBackLink`}
>
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export const CreateDatasourcePage: React.FunctionComponent = () => {
const layoutProps = {
from,
cancelUrl,
cancelOnClick: cancelClickHandler,
onCancel: cancelClickHandler,
agentConfig,
packageInfo,
};
Expand Down

0 comments on commit 38e99d5

Please sign in to comment.