tagDeprecated.stories.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. import React from 'react';
  2. import Tag from 'app/components/tagDeprecated';
  3. import Tooltip from 'app/components/tooltip';
  4. export default {
  5. title: 'Deprecated/TagDeprecated',
  6. };
  7. export const Overview = () => (
  8. <React.Fragment>
  9. <div>
  10. <Tag>default</Tag>
  11. </div>
  12. <div>
  13. <Tag priority="error">error</Tag>
  14. </div>
  15. <div>
  16. <Tag priority="warning">warning</Tag>
  17. </div>
  18. <div>
  19. <Tag priority="success">success</Tag>
  20. </div>
  21. <div>
  22. <Tooltip
  23. title="This feature is in beta and may change in the future."
  24. tooltipOptions={{
  25. placement: 'right',
  26. }}
  27. >
  28. <span>
  29. <Tag priority="beta">beta</Tag>
  30. </span>
  31. </Tooltip>
  32. </div>
  33. <div>
  34. <Tag priority="new">new</Tag>
  35. </div>
  36. <div>
  37. <Tag priority="alpha">alpha</Tag>
  38. </div>
  39. </React.Fragment>
  40. );
  41. export const Default = () => <Tag>Development</Tag>;
  42. Default.storyName = 'default';
  43. Default.parameters = {
  44. docs: {
  45. description: {
  46. story: 'A basic tag-like thing. If you pass no type, it will be gray',
  47. },
  48. },
  49. };
  50. export const Warning = () => <Tag priority="warning">Development</Tag>;
  51. Warning.storyName = 'warning';
  52. Warning.parameters = {
  53. docs: {
  54. description: {
  55. story:
  56. 'A warning tag-like thing. Use this to signal that something is maybe not so great',
  57. },
  58. },
  59. };
  60. export const Success = () => <Tag priority="success">Development</Tag>;
  61. Success.storyName = 'success';
  62. Success.parameters = {
  63. docs: {
  64. description: {
  65. story: 'A happy tag-like thing. Use this to signal something good',
  66. },
  67. },
  68. };
  69. export const Beta = () => (
  70. <Tooltip
  71. title="This feature is in beta and may change in the future."
  72. tooltipOptions={{
  73. placement: 'right',
  74. }}
  75. >
  76. <span>
  77. <Tag priority="beta">beta</Tag>
  78. </span>
  79. </Tooltip>
  80. );
  81. Beta.storyName = 'beta';
  82. Beta.parameters = {
  83. docs: {
  84. description: {
  85. story:
  86. 'An attention grabbing thing. Use this to communicate shiny new functionality.',
  87. },
  88. },
  89. };
  90. export const New = () => (
  91. <Tooltip
  92. title="This feature is new and may change in the future."
  93. tooltipOptions={{
  94. placement: 'right',
  95. }}
  96. >
  97. <span>
  98. <Tag priority="new">new</Tag>
  99. </span>
  100. </Tooltip>
  101. );
  102. New.storyName = 'new';
  103. New.parameters = {
  104. docs: {
  105. description: {
  106. story:
  107. 'An attention grabbing thing. Use this to communicate shiny new functionality.',
  108. },
  109. },
  110. };
  111. export const Small = () => (
  112. <Tag size="small" border>
  113. new
  114. </Tag>
  115. );
  116. Small.storyName = 'small';
  117. Small.parameters = {
  118. docs: {
  119. description: {
  120. story: 'A small tag-like thing. Use this when space is at a premium',
  121. },
  122. },
  123. };
  124. export const WithIcon = () => <Tag icon="icon-lock">Locked</Tag>;
  125. WithIcon.storyName = 'with icon';
  126. WithIcon.parameters = {
  127. docs: {
  128. description: {
  129. story: 'A tag-like thing with an icon. Use when you need to represent something',
  130. },
  131. },
  132. };