1 | /** |
---|
2 | * Internal dependencies |
---|
3 | */ |
---|
4 | import PricingSection from '..'; |
---|
5 | /** |
---|
6 | * Types |
---|
7 | */ |
---|
8 | import type { ComponentStory, ComponentMeta } from '@storybook/react'; |
---|
9 | |
---|
10 | window.jetpackVideoPressInitialState = { |
---|
11 | allowedVideoExtensions: {}, |
---|
12 | adminUri: 'admin-uri', |
---|
13 | apiNonce: 'nonce', |
---|
14 | apiRoot: 'https://api-root.com', |
---|
15 | registrationNonce: 'registration-nonce', |
---|
16 | paidFeatures: { |
---|
17 | isVideoPressSupported: true, |
---|
18 | isVideoPress1TBSupported: true, |
---|
19 | isVideoPressUnlimitedSupported: false, |
---|
20 | }, |
---|
21 | adminUrl: 'https://admin-url.com', |
---|
22 | siteSuffix: 'site-suffix', |
---|
23 | siteProductData: { |
---|
24 | slug: 'videopress', |
---|
25 | plugin_slug: 'jetpack-videopress', |
---|
26 | name: 'VideoPress', |
---|
27 | title: 'Jetpack VideoPress', |
---|
28 | description: 'High quality, ad-free video', |
---|
29 | long_description: 'High-quality, ad-free video built specifically for WordPress.', |
---|
30 | features: [ |
---|
31 | '1TB of storage', |
---|
32 | 'Built into WordPress editor', |
---|
33 | 'Ad-free and customizable player', |
---|
34 | 'Unlimited users', |
---|
35 | ], |
---|
36 | status: 'error', |
---|
37 | pricing_for_ui: { |
---|
38 | available: true, |
---|
39 | wpcom_product_slug: 'jetpack_videopress', |
---|
40 | currency_code: 'USD', |
---|
41 | full_price: 119.4, |
---|
42 | discount_price: 59.4, |
---|
43 | }, |
---|
44 | is_bundle: false, |
---|
45 | is_upgradable_by_bundle: false, |
---|
46 | supported_products: [], |
---|
47 | wpcom_product_slug: 'jetpack_videopress', |
---|
48 | requires_user_connection: true, |
---|
49 | has_required_plan: true, |
---|
50 | manage_url: 'http://localhost/wp-admin/admin.php?page=jetpack-videopress', |
---|
51 | post_activation_url: '', |
---|
52 | }, |
---|
53 | contentNonce: 'content-nonce', |
---|
54 | }; |
---|
55 | |
---|
56 | export default { |
---|
57 | title: 'Packages/VideoPress/PricingSection', |
---|
58 | component: PricingSection, |
---|
59 | } as ComponentMeta< typeof PricingSection >; |
---|
60 | |
---|
61 | const Template: ComponentStory< typeof PricingSection > = args => <PricingSection { ...args } />; |
---|
62 | |
---|
63 | export const Default = Template.bind( {} ); |
---|