Server IP : 192.158.238.246 / Your IP : 18.116.65.119 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/7779/task/7779/cwd/plugins/give/src/Onboarding/Setup/templates/stories/ |
Upload File : |
import styles from './src/styles'; import paypal from './src/paypal.js'; import stripe from './src/stripe.js'; import section from '../section.html'; import footer from '../footer.html'; import dismiss from '../dismiss.html'; import {withA11y} from '@storybook/addon-a11y'; export default { title: 'Setup Page/Components', decorators: [withA11y], }; const Styles = '<style>' + styles + '</style>'; export const header = () => Styles + section .replace(/{{\s*title\s*}}/gi, 'Connect a payment gateway to begin accepting donations') .replace(/{{\s*badge\s*}}/gi, '<span class="badge badge-complete">Complete</span>') .replace(/{{\s*contents\s*}}/gi, '') .replace(/{{\s*footer\s*}}/gi, ''); export const Footer = () => Styles + '<section>' + footer.replace( /{{\s*contents\s*}}/gi, 'Want to use a different gateway? GiveWP has support for many others including Authorize.net, Square, Razorpay and more!<a href="#">View all gateways</a>' ) + '</section>'; export const Dismiss = () => Styles + dismiss .replace(/{{\s*action\s*}}/gi, '') .replace(/{{\s*nonce\s*}}/gi, '') .replace(/{{\s*label\s*}}/gi, 'Dismiss Setup Screen'); export const SectionBasic = () => Styles + ` <section> <header> <h2>Connect a payment gateway to begin accepting donations</h2> </header> <main> ` + paypal() + ` </main> </section> `; export const SectionMultiple = () => Styles + ` <section> <main> ` + paypal() + stripe() + ` </main> </section> `; export const SectionWithHeader = () => Styles + ` <section> <header> <h2>Connect a payment gateway to begin accepting donations</h2> </header> <main> ` + paypal() + ` </main> </section> `; export const SectionWithFooter = () => Styles + ` <section> <main> ` + paypal() + ` </main> ` + footer.replace( /{{\s*contents\s*}}/gi, 'Want to use a different gateway? GiveWP has support for many others including Authorize.net, Square, Razorpay and more!<a href="#">View all gateways</a>' ) + ` </section> `; export const SectionMarkedComplete = () => Styles + ` <section> <header> <h2>Connect a payment gateway to begin accepting donations</h2> <span class="badge badge-complete">Complete</span> </header> <main> ` + paypal() + ` </main> </section> `;