diff --git a/packages/react/components/Patrons/index.mjs b/packages/react/components/Patrons/index.mjs index 7d9250d82c7..06dd72247c5 100644 --- a/packages/react/components/Patrons/index.mjs +++ b/packages/react/components/Patrons/index.mjs @@ -4,6 +4,18 @@ import { linkClasses } from '@freesewing/utils' import React, { useEffect, useState } from 'react' import { useAccount } from '@freesewing/react/hooks/useAccount' +/** + * A component to ask people to support FreeSewing financially + * + * This component will pass down all props to the Subscribe component + * + * @component + * @param {object} props - All component props + * @param {boolean} [props.dense = undefined] - Whether to render a more dense view + * @param {object} [props.js = undefined] - An optional Javascript Object to highlight + * @param {JSX.Element} props.children - The component children, will be rendered if props.js is not set + * @returns {JSX.Element} + */ export const PleaseSubscribe = (props = {}) => (
(
) +/** + * A component that shows a plea for financial support + * + * @component + * @param {object} props - All component props + * @returns {JSX.Element} + */ export const Plea = () => (

@@ -71,6 +90,17 @@ const PaypalFormBody = ({ amount, period, currency }) => ( ) +/** + * A component to set up a finciancial subscription to FreeSewing, also can handle one-time donations + * + * @component + * @param {object} props - All component props + * @param {string} [props.color = secondary] - One of the DaisyUI colors + * @param {boolean} [props.subscribeOnly = undefined] - Set this to true to remove the option to make a one-time donation + * @param {number} [props.amountPreset = 25] - The amount to preset + * @param {number} [props.periodPreset = m] - The period to preset + * @returns {JSX.Element} + */ export const Subscribe = ({ color = 'secondary', subscribeOnly, @@ -190,6 +220,15 @@ export const Subscribe = ({ ) } +/** + * A component that renders the signed name for joost, the FreeSewing maintainer, as SVG + * + * @component + * @param {object} props - All component props + * @param {string} [props.className = 'tw:w-32'] - Allows you to override the styling, including the size + * @param {number} [props.stroke = 0] - An optional stroke width + * @returns {JSX.Element} + */ export const Joost = ({ className = 'tw:w-32', stroke = 0 }) => ( ../../sites/dev/prebuild/jsdoc/react/co jsdoc -c jsdoc.json components/Newsletter/* > ../../sites/dev/prebuild/jsdoc/react/components/newsletter.json jsdoc -c jsdoc.json components/Null/* > ../../sites/dev/prebuild/jsdoc/react/components/null.json jsdoc -c jsdoc.json components/Number/* > ../../sites/dev/prebuild/jsdoc/react/components/number.json +jsdoc -c jsdoc.json components/Patrons/* > ../../sites/dev/prebuild/jsdoc/react/components/patrons.json diff --git a/sites/dev/docs/reference/packages/react/components/patrons/readme.mdx b/sites/dev/docs/reference/packages/react/components/patrons/readme.mdx index e6c0a41ee61..9b8b35e223e 100644 --- a/sites/dev/docs/reference/packages/react/components/patrons/readme.mdx +++ b/sites/dev/docs/reference/packages/react/components/patrons/readme.mdx @@ -1,7 +1,31 @@ --- title: Patrons --- +import { DocusaurusDoc } from '@freesewing/react/components/Docusaurus' +import { ComponentDocs } from '@site/src/components/component-docs.js' +import * as jsdoc from '@site/prebuild/jsdoc/components.patrons.mjs' +import { Joost, Plea, PleaseSubscribe, Subscribe } from '@freesewing/react/components/Patrons' -:::note -This page is yet to be created -::: + + + +The __Patrons__ component family provides the following components: + +- [Joost](#joost) +- [Plea](#plea) +- [PleaseSubscribe](#pleasesubscribe) +- [Subscribe](#subscribe) + +## Joost + + +## Plea + + +## PleaseSubscribe + + +## Subscribe + + +