current-plan-widget.stories.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import CurrentPlanWidget from '../../js/features/project-list/components/current-plan-widget/current-plan-widget'
  2. export const FreePlan = (args: any) => {
  3. window.metaAttributesCache.set('ol-usersBestSubscription', {
  4. type: 'free',
  5. })
  6. return <CurrentPlanWidget {...args} />
  7. }
  8. export const PaidPlanTrialLastDay = (args: any) => {
  9. window.metaAttributesCache.set('ol-usersBestSubscription', {
  10. type: 'individual',
  11. remainingTrialDays: 1,
  12. plan: {
  13. name: 'Individual',
  14. },
  15. subscription: {
  16. name: 'Example Name',
  17. },
  18. })
  19. return <CurrentPlanWidget {...args} />
  20. }
  21. export const PaidPlanRemainingDays = (args: any) => {
  22. window.metaAttributesCache.set('ol-usersBestSubscription', {
  23. type: 'individual',
  24. remainingTrialDays: 5,
  25. plan: {
  26. name: 'Individual',
  27. },
  28. subscription: {
  29. name: 'Example Name',
  30. },
  31. })
  32. return <CurrentPlanWidget {...args} />
  33. }
  34. export const PaidPlanActive = (args: any) => {
  35. window.metaAttributesCache.set('ol-usersBestSubscription', {
  36. type: 'individual',
  37. plan: {
  38. name: 'Individual',
  39. },
  40. subscription: {
  41. name: 'Example Name',
  42. },
  43. })
  44. return <CurrentPlanWidget {...args} />
  45. }
  46. export default {
  47. title: 'Project List / Current Plan Widget',
  48. component: CurrentPlanWidget,
  49. }