Manual Reference Source

basic/ParameterValueDescription.js

  1. /**
  2. * Created by jakubniezgoda on 25/10/2018.
  3. */
  4.  
  5. import React, { Component } from 'react';
  6.  
  7. import { List, ParameterValue, PopupHelp } from './index';
  8.  
  9. export default class ParameterValueDescription extends Component {
  10. constructor(props, context) {
  11. super(props, context);
  12. }
  13.  
  14. shouldComponentUpdate(nextProps) {
  15. return !_.isEqual(this.props, nextProps);
  16. }
  17.  
  18. render() {
  19. return (
  20. <PopupHelp
  21. flowing
  22. header="Value style"
  23. content={
  24. <List bulleted>
  25. <List.Item>
  26. String:
  27. <ParameterValue value="centos_core" showCopyButton={false} />,
  28. <ParameterValue value="763878b2-67d1-4a8b-9c44-cc3d17625eed" showCopyButton={false} />
  29. </List.Item>
  30. <List.Item>
  31. Boolean:
  32. <ParameterValue value showCopyButton={false} />,
  33. <ParameterValue value={false} showCopyButton={false} />
  34. </List.Item>
  35. <List.Item>
  36. Number:
  37. <ParameterValue value={623946} showCopyButton={false} />,
  38. <ParameterValue value={3.14} showCopyButton={false} />
  39. </List.Item>
  40. <List.Item>
  41. Object:
  42. <ParameterValue
  43. value={{
  44. sku: '14.04.5-LTS',
  45. publisher: 'Canonical',
  46. version: 'latest',
  47. offer: 'UbuntuServer'
  48. }}
  49. showCopyButton={false}
  50. />
  51. </List.Item>
  52. <List.Item>
  53. Array:
  54. <ParameterValue
  55. value={['node_f73mxd', 'vm_32jdfg', 'host_f92mv7']}
  56. showCopyButton={false}
  57. />
  58. </List.Item>
  59. <List.Item>
  60. Link:&nbsp;&nbsp;
  61. <ParameterValue value="https://cloudify.co" showCopyButton={false} />
  62. </List.Item>
  63. <List.Item>
  64. Null:
  65. <ParameterValue value={null} showCopyButton={false} />
  66. </List.Item>
  67. </List>
  68. }
  69. />
  70. );
  71. }
  72. }