feat(dev): Added react docs for Pattern + refactor
This adds support for not only documenating components, but also constants and functions that may be exported next to components.
This commit is contained in:
parent
d0baf7cece
commit
22a89f12d3
50 changed files with 1816 additions and 669 deletions
|
@ -2,6 +2,21 @@
|
|||
import React from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
|
||||
/**
|
||||
* A component to render an SVG tag to hold a FreeSewing pattern
|
||||
*
|
||||
* @component
|
||||
* @param {object} props - All component props
|
||||
* @param {JSX.Element} props.children - The component children, will be rendered inside the SVG tag
|
||||
* @param {strign} [props.className = 'freesewing pattern'] - The CSS classes to apply to the SVG tag
|
||||
* @param {string} [props.embed = true] - Set this to false to output SVG suitable for printing rather than auto-scaled SVG
|
||||
* @param {number} props.heigth - The pattern height in mm
|
||||
* @param {string} [props.locale = en] - The locale/language to use
|
||||
* @param {object} [props.style = {}] - Any additional style to apply to the SVG tag
|
||||
* @param {object} [props.viewBox = false] - Set this to use a custom viewBox attribute rather than the default 0 0 width height
|
||||
* @param {number} props.width - The pattern width in mm
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
export const Svg = forwardRef(
|
||||
(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue