Skip to content

Commit

Permalink
label updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Nov 12, 2019
1 parent f39274d commit 5eb2009
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const SimpleTemplate: FunctionComponent<Props> = ({ onValueChange, argVal
checked={Boolean(argValue)}
onChange={() => onValueChange(!Boolean(argValue))}
showLabel={false}
label="" // TODO: Add label for a11y
label=""
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import React, { FC, useState, useContext, useEffect } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiSwitch } from '@elastic/eui';
import { JobCreatorContext } from '../../../../../job_creator_context';
import { Description } from './description';
Expand All @@ -30,7 +31,12 @@ export const DedicatedIndexSwitch: FC = () => {
onChange={toggleModelPlot}
data-test-subj="mlJobWizardSwitchUseDedicatedIndex"
showLabel={false}
label="" // TODO: Add label for a11y
label={i18n.translate(
'xpack.ml.newJob.wizard.jobDetailsStep.advancedSection.useDedicatedIndex.title',
{
defaultMessage: 'Use dedicated index',
}
)}
/>
</Description>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import React, { FC, useState, useContext, useEffect } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiSwitch } from '@elastic/eui';
import { JobCreatorContext } from '../../../../../job_creator_context';
import { Description } from './description';
Expand All @@ -30,7 +31,12 @@ export const ModelPlotSwitch: FC = () => {
onChange={toggleModelPlot}
data-test-subj="mlJobWizardSwitchModelPlot"
showLabel={false}
label="" // TODO: Add label for a11y
label={i18n.translate(
'xpack.ml.newJob.wizard.jobDetailsStep.advancedSection.enableModelPlot.title',
{
defaultMessage: 'Enable model plot',
}
)}
/>
</Description>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import React, { FC, useState, useContext, useEffect } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiSwitch } from '@elastic/eui';
import { JobCreatorContext } from '../../../job_creator_context';
import { Description } from './description';
Expand Down Expand Up @@ -44,7 +45,9 @@ export const SparseDataSwitch: FC = () => {
onChange={toggleSparseData}
data-test-subj="mlJobWizardSwitchSparseData"
showLabel={false}
label="" // TODO: Add label for a11y
label={i18n.translate('xpack.ml.newJob.wizard.pickFieldsStep.sparseData.title', {
defaultMessage: 'Sparse data',
})}
/>
</Description>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ export const JobSettingsForm: FC<JobSettingsFormProps> = ({
});
}}
showLabel={false}
label="" // TODO: Add label for a11y
label={i18n.translate('xpack.ml.newJob.recognize.useDedicatedIndexLabel', {
defaultMessage: 'Use dedicated index',
})}
/>
</EuiFormRow>
</EuiDescribedFormGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const JobSwitch = React.memo<JobSwitchProps>(
onJobStateChange(job, job.latestTimestampMs || 0, e.target.checked);
}}
showLabel={false}
label="" // TODO: Add label for a11y
label=""
/>
)}
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class FeatureTable extends Component<Props, {}> {
id={record.feature.id}
checked={checked}
onChange={this.onChange(record.feature.id) as any}
label={checked ? `${record.feature.name} visible` : `${record.feature.name} disabled`}
label={`${record.feature.name} visible`}
showLabel={false}
/>
);
Expand Down

0 comments on commit 5eb2009

Please sign in to comment.