current-plan-widget.stories.tsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 const PausedPlan = (args: any) => {
  47. window.metaAttributesCache.set('ol-usersBestSubscription', {
  48. type: 'individual',
  49. plan: {
  50. name: 'Individual',
  51. },
  52. subscription: {
  53. name: 'Example Name',
  54. recurlyStatus: {
  55. state: 'paused',
  56. },
  57. },
  58. })
  59. return <CurrentPlanWidget {...args} />
  60. }
  61. export default {
  62. title: 'Project List / Current Plan Widget',
  63. component: CurrentPlanWidget,
  64. }