1
0
Fork 0

[react] feat: Added docs for components/Input

This commit is contained in:
joostdecock 2025-05-11 17:55:53 +02:00
parent ffa122e524
commit 612af4081b
7 changed files with 829 additions and 291 deletions

View file

@ -27,7 +27,7 @@ import { Uuid } from '@freesewing/react/components/Uuid'
import { Popout } from '@freesewing/react/components/Popout'
import { ModalWrapper } from '@freesewing/react/components/Modal'
import { NumberCircle } from '@freesewing/react/components/Number'
import { StringInput, FormControl, ListInput } from '@freesewing/react/components/Input'
import { StringInput, Fieldset, ListInput } from '@freesewing/react/components/Input'
import { DisplayRow } from './shared.mjs'
import { CopyToClipboardButton } from '@freesewing/react/components/Button'
import { TimeAgo, TimeToGo } from '@freesewing/react/components/Time'
@ -333,7 +333,7 @@ const ExpiryPicker = ({ expires, setExpires }) => {
return (
<div className="tw:flex tw:flex-row tw:gap-2 tw:items-center">
<FormControl
<Fieldset
label="Key Expiry"
labelBL={shortDate(expires)}
labelBR={<TimeToGo iso={expires} />}
@ -346,7 +346,7 @@ const ExpiryPicker = ({ expires, setExpires }) => {
className="tw:daisy-range tw:daisy-range-secondary tw:w-full"
onChange={update}
/>
</FormControl>
</Fieldset>
</div>
)
}

View file

@ -6,7 +6,7 @@ import React, { useState, useMemo } from 'react'
// Components
import { SubAccordion } from '../Accordion.mjs'
import { EditIcon, GroupIcon, OptionsIcon, ResetIcon } from '@freesewing/react/components/Icon'
import { FormControl } from '@freesewing/react/components/Input'
import { Fieldset } from '@freesewing/react/components/Input'
import { MiniTip } from '@freesewing/react/components/Mini'
const iconButtonClass = 'tw:daisy-btn tw:daisy-btn-xs tw:daisy-btn-ghost tw:px-0 tw:text-accent'
@ -105,7 +105,7 @@ export const MenuItem = ({
return (
<>
<FormControl
<Fieldset
label={false}
id={config.name}
labelBR={<div className="tw:flex tw:flex-row tw:items-center tw:gap-2">{buttons}</div>}
@ -118,7 +118,7 @@ export const MenuItem = ({
}
>
<Input {...drillProps} />
</FormControl>
</Fieldset>
{config.about ? <MiniTip>{config.about}</MiniTip> : null}
</>
)

File diff suppressed because it is too large Load diff

View file

@ -14,3 +14,4 @@ jsdoc -c jsdoc.json components/Editor/* > ../../sites/dev/prebuild/jsdoc/react/c
jsdoc -c jsdoc.json components/Heading/* > ../../sites/dev/prebuild/jsdoc/react/components/heading.json
jsdoc -c jsdoc.json components/Highlight/* > ../../sites/dev/prebuild/jsdoc/react/components/highlight.json
jsdoc -c jsdoc.json components/Icon/* > ../../sites/dev/prebuild/jsdoc/react/components/icon.json
jsdoc -c jsdoc.json components/Input/* > ../../sites/dev/prebuild/jsdoc/react/components/input.json