[react] feat: Added docs for components/Newsletter
This commit is contained in:
parent
0ecb1c8fd2
commit
4c582bf26f
3 changed files with 36 additions and 11 deletions
|
@ -17,11 +17,16 @@ import { Popout } from '@freesewing/react/components/Popout'
|
|||
import { IconButton } from '@freesewing/react/components/Button'
|
||||
import { MiniTip } from '@freesewing/react/components/Mini'
|
||||
|
||||
/*
|
||||
* Component for newsletter signup (by visitors)
|
||||
/**
|
||||
* Component for newsletter signup by visitors (not logged-in users)
|
||||
*
|
||||
* @params {object} props - All React props
|
||||
* @param {function} props.Link - An optional framework-specific Link component
|
||||
* @component
|
||||
* @param {object} props - All component props
|
||||
* @param {React.FC} [props.Link = false] - An optional framework-specific Link component
|
||||
* @param {boolean} [props.noP = false] - Set this to true to not display the signup message paragraph
|
||||
* @param {boolean} [props.noTitle = false] - Set this to true to not display the signup title
|
||||
* @param {boolean} [props.noBox = false] - Set this to true to not apply the box style
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
export const NewsletterSignup = ({ Link = false, noP = false, noTitle = false, noBox = false }) => {
|
||||
if (!Link) Link = WebLink
|
||||
|
@ -120,11 +125,13 @@ export const NewsletterSignup = ({ Link = false, noP = false, noTitle = false, n
|
|||
)
|
||||
}
|
||||
|
||||
/*
|
||||
* Component to handle newsletter unsubscribe links
|
||||
/**
|
||||
* Component for handling newsletter unsubscribe links
|
||||
*
|
||||
* @params {object} props - All React props
|
||||
* @param {function} props.Link - An optional framework-specific Link component
|
||||
* @component
|
||||
* @param {object} props - All component props
|
||||
* @param {React.FC} [props.Link = false] - An optional framework-specific Link component
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
export const NewsletterUnsubscribe = ({ Link = false }) => {
|
||||
if (!Link) Link = WebLink
|
||||
|
|
|
@ -23,3 +23,4 @@ jsdoc -c jsdoc.json components/Link/* > ../../sites/dev/prebuild/jsdoc/react/com
|
|||
jsdoc -c jsdoc.json components/Logo/* > ../../sites/dev/prebuild/jsdoc/react/components/logo.json
|
||||
jsdoc -c jsdoc.json components/Mini/* > ../../sites/dev/prebuild/jsdoc/react/components/mini.json
|
||||
jsdoc -c jsdoc.json components/Modal/* > ../../sites/dev/prebuild/jsdoc/react/components/modal.json
|
||||
jsdoc -c jsdoc.json components/Newsletter/* > ../../sites/dev/prebuild/jsdoc/react/components/newsletter.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue