Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use EUI components for tutorial params (#167014)
## Summary Partially addresses #46410 Stops using `kuiTextInput` CSS class name in `number_parameter.js` and `string_paramter.js` components in the `home` plugin. How to test? I don't know if these parameters are still used, so to test this apply this patch: ```diff diff --git a/src/plugins/home/public/application/components/tutorial/instruction_set.js b/src/plugins/home/public/application/components/tutorial/instruction_set.js index 651212f062c..7f2077a322d 100644 --- a/src/plugins/home/public/application/components/tutorial/instruction_set.js +++ b/src/plugins/home/public/application/components/tutorial/instruction_set.js @@ -261,14 +261,20 @@ class InstructionSetUi extends React.Component { render() { let paramsForm; - if (this.props.params && this.state.isParamFormVisible) { + if (true) { paramsForm = ( <> + PARAMETER FORM <EuiSpacer /> <ParameterForm - params={this.props.params} - paramValues={this.props.paramValues} - setParameter={this.props.setParameter} + params={[ + { id: 'test', label: 'test', type: 'string' }, + { id: 'test2', label: 'test2', type: 'number'} + ]} + paramValues={{ test: 'test', test2: 123 }} + setParameter={(id, value) => { + console.log('setParameter', id, value); + }} /> </> ); ``` And go to `/app/home#/tutorial/apm` page, you will see the new parameter input look there: <img width="478" alt="image" src="https://github.com/elastic/kibana/assets/82822460/ba3a3dce-c2d5-41db-a7e8-24bf6caeb16b"> Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information