chore [react]: Prettier
This commit is contained in:
parent
47d4a27f64
commit
daaf407028
8 changed files with 33 additions and 15 deletions
|
@ -22,7 +22,9 @@ export const Breadcrumbs = ({ crumbs = [], title, Link = false }) => {
|
||||||
style={{ paddingLeft: 0 }}
|
style={{ paddingLeft: 0 }}
|
||||||
>
|
>
|
||||||
<li className="tw:inline">
|
<li className="tw:inline">
|
||||||
<Link href="/"><b>Home</b></Link>
|
<Link href="/">
|
||||||
|
<b>Home</b>
|
||||||
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
{crumbs.map((crumb, i) => (
|
{crumbs.map((crumb, i) => (
|
||||||
|
@ -30,7 +32,9 @@ export const Breadcrumbs = ({ crumbs = [], title, Link = false }) => {
|
||||||
<li key={i} className="tw:inline">
|
<li key={i} className="tw:inline">
|
||||||
<Link href={crumb.href}>{crumb.label}</Link>
|
<Link href={crumb.href}>{crumb.label}</Link>
|
||||||
</li>
|
</li>
|
||||||
<li key={i} className="tw:inline"><Spacer /></li>
|
<li key={i} className="tw:inline">
|
||||||
|
<Spacer />
|
||||||
|
</li>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
<li className="tw:inline">{title}</li>
|
<li className="tw:inline">{title}</li>
|
||||||
|
|
|
@ -29,7 +29,14 @@ const handleCopied = (content, setCopied, setLoadingStatus, label, handler=false
|
||||||
* @param {boolean} props.sup - Set this to true to render as superscript (above the line)
|
* @param {boolean} props.sup - Set this to true to render as superscript (above the line)
|
||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
*/
|
*/
|
||||||
export const CopyToClipboardButton = ({ children, content, label = false, sup = false, btnClasses="tw:daisy-btn tw:daisy-btn-ghost tw:hover:border-transparent w:hover:border-transparent tw:hover:shadow-none", onCopy=false }) => {
|
export const CopyToClipboardButton = ({
|
||||||
|
children,
|
||||||
|
content,
|
||||||
|
label = false,
|
||||||
|
sup = false,
|
||||||
|
btnClasses = 'tw:daisy-btn tw:daisy-btn-ghost tw:hover:border-transparent w:hover:border-transparent tw:hover:shadow-none',
|
||||||
|
onCopy = false,
|
||||||
|
}) => {
|
||||||
const [copied, setCopied] = useState(false)
|
const [copied, setCopied] = useState(false)
|
||||||
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,8 @@ export const TestView = ({ Design, state, update, config }) => {
|
||||||
't',
|
't',
|
||||||
'ASC'
|
'ASC'
|
||||||
)
|
)
|
||||||
const btnClasses = "tw:my-0.5 tw:block tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline tw:daisy-btn-xs tw:flex tw:flex-row tw:items-center tw:justify-between tw:w-full tw:max-w-64"
|
const btnClasses =
|
||||||
|
'tw:my-0.5 tw:block tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline tw:daisy-btn-xs tw:flex tw:flex-row tw:items-center tw:justify-between tw:w-full tw:max-w-64'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -162,7 +163,8 @@ const SampleOptionsMenu = ({ Design, state, update }) => {
|
||||||
|
|
||||||
const SampleOptionsSubMenu = ({ structure, update, level = 1 }) => {
|
const SampleOptionsSubMenu = ({ structure, update, level = 1 }) => {
|
||||||
const output = []
|
const output = []
|
||||||
const btnClasses = "tw:my-0.5 tw:block tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline tw:daisy-btn-xs tw:flex tw:flex-row tw:items-center tw:justify-between tw:w-full tw:max-w-64"
|
const btnClasses =
|
||||||
|
'tw:my-0.5 tw:block tw:daisy-btn tw:daisy-btn-primary tw:daisy-btn-outline tw:daisy-btn-xs tw:flex tw:flex-row tw:items-center tw:justify-between tw:w-full tw:max-w-64'
|
||||||
/*
|
/*
|
||||||
* Show entries alphabetic, but force groups last, and advanced last among them
|
* Show entries alphabetic, but force groups last, and advanced last among them
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -110,15 +110,15 @@ export const UndoStep = ({ update, state, step, Design, compact = false, index =
|
||||||
<>
|
<>
|
||||||
<ButtonFrame onClick={() => update.restore(index, state._)}>
|
<ButtonFrame onClick={() => update.restore(index, state._)}>
|
||||||
<div className="tw:flex tw:flex-col tw:font-medium tw:items-end tw:w-full tw:-mb-2">
|
<div className="tw:flex tw:flex-col tw:font-medium tw:items-end tw:w-full tw:-mb-2">
|
||||||
<div className="tw:text-sm tw:-mt-2 tw:italic"><UndoStepTimeAgo step={step} /></div>
|
<div className="tw:text-sm tw:-mt-2 tw:italic">
|
||||||
|
<UndoStepTimeAgo step={step} />
|
||||||
|
</div>
|
||||||
<div className="tw:flex tw:flex-row tw:items-center tw:justify-start tw:gap-2 tw:w-full tw:text-lg tw:-mt-2">
|
<div className="tw:flex tw:flex-row tw:items-center tw:justify-start tw:gap-2 tw:w-full tw:text-lg tw:-mt-2">
|
||||||
<span className="tw:opacity-70 tw:flex tw:flex-row tw:gap-1 tw:items-center tw:text-base">
|
<span className="tw:opacity-70 tw:flex tw:flex-row tw:gap-1 tw:items-center tw:text-base">
|
||||||
{data.menu}
|
{data.menu}
|
||||||
</span>
|
</span>
|
||||||
<span>»</span>
|
<span>»</span>
|
||||||
<span className="tw:flex tw:flex-row tw:gap-2 tw:items-center">
|
<span className="tw:flex tw:flex-row tw:gap-2 tw:items-center">{data.title}</span>
|
||||||
{data.title}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="tw:flex tw:flex-row tw:gap-1 tw:items-center tw:align-start tw:w-full">
|
<div className="tw:flex tw:flex-row tw:gap-1 tw:items-center tw:align-start tw:w-full">
|
||||||
{data.msg ? (
|
{data.msg ? (
|
||||||
|
|
|
@ -119,4 +119,3 @@ export const H6 = ({ children }) => (
|
||||||
{children}
|
{children}
|
||||||
</h6>
|
</h6>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,13 @@ import { ModalWrapper } from '@freesewing/react/components/Modal'
|
||||||
* @param {object} props - All component props
|
* @param {object} props - All component props
|
||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
*/
|
*/
|
||||||
const Iframe = (props) => <iframe {...props} style={{ height: '90vh', width: '90vw' }} className="tw:w-full tw:mx-auto tw:max-w-4xl" />
|
const Iframe = (props) => (
|
||||||
|
<iframe
|
||||||
|
{...props}
|
||||||
|
style={{ height: '90vh', width: '90vw' }}
|
||||||
|
className="tw:w-full tw:mx-auto tw:max-w-4xl"
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A component to display an iframe with FreeSewing.eu docs content intended for a modal window.
|
* A component to display an iframe with FreeSewing.eu docs content intended for a modal window.
|
||||||
|
@ -21,7 +27,9 @@ const Iframe = (props) => <iframe {...props} style={{ height: '90vh', width: '90
|
||||||
* @param {string} props.path - The (relative) URL path of the page to load
|
* @param {string} props.path - The (relative) URL path of the page to load
|
||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
*/
|
*/
|
||||||
const DocsHelp = ({ path }) => <Iframe src={`https://freesewing.eu/${path}/?docusaurus-data-fs-embed=true`} />
|
const DocsHelp = ({ path }) => (
|
||||||
|
<Iframe src={`https://freesewing.eu/${path}/?docusaurus-data-fs-embed=true`} />
|
||||||
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A component to display inline help for a design option
|
* A component to display inline help for a design option
|
||||||
|
|
|
@ -84,7 +84,6 @@ export const ModalWrapper = ({
|
||||||
onClick={keepOpenOnClick ? stopClick : null}
|
onClick={keepOpenOnClick ? stopClick : null}
|
||||||
className={`tw:z-30 tw:bg-base-100 tw:p-4 tw:lg:px-8 tw:lg:rounded-lg tw:lg:shadow-lg tw:max-h-full tw:overflow-auto tw:hover:cursor-default ${
|
className={`tw:z-30 tw:bg-base-100 tw:p-4 tw:lg:px-8 tw:lg:rounded-lg tw:lg:shadow-lg tw:max-h-full tw:overflow-auto tw:hover:cursor-default ${
|
||||||
fullWidth ? 'tw:w-full' : ''
|
fullWidth ? 'tw:w-full' : ''
|
||||||
|
|
||||||
} ${wide ? 'tw:max-w-5xl tw:w-full' : ''} `}
|
} ${wide ? 'tw:max-w-5xl tw:w-full' : ''} `}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
@ -711,4 +711,3 @@ Backend.prototype.updateSet = async function (id, data) {
|
||||||
Backend.prototype.uploadImage = async function (data) {
|
Backend.prototype.uploadImage = async function (data) {
|
||||||
return await this.post('/images/jwt', data)
|
return await this.post('/images/jwt', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue