The three prop getters from useUpupUpload treat their overrides argument differently (3.1.0, @upupjs/react/dist/index.cjs):
getRootProps(overrides) — spreads ...overrides first, then sets role/aria after. Styling overrides work.
getDropzoneProps(overrides) — composes the four drag/drop handlers from overrides but returns the object without spreading the rest. className, style, or anything else passed in is silently dropped.
getInputProps(overrides) — spreads ...overrides first, but then sets style: { display: 'none' } after the spread, so a style override is always clobbered.
Our first headless integration passed className through getDropzoneProps and lost half an hour to the styling silently going nowhere before we read the dist source.
It'd be good if all three getters followed the same contract (spread overrides, compose getter-owned handlers, and document any keys the getter must own). If display: none on the input is load-bearing, that's fine — but then dropping/clobbering should at least be documented on the headless guide's prop-getter section.
The three prop getters from
useUpupUploadtreat theiroverridesargument differently (3.1.0,@upupjs/react/dist/index.cjs):getRootProps(overrides)— spreads...overridesfirst, then sets role/aria after. Styling overrides work.getDropzoneProps(overrides)— composes the four drag/drop handlers from overrides but returns the object without spreading the rest.className,style, or anything else passed in is silently dropped.getInputProps(overrides)— spreads...overridesfirst, but then setsstyle: { display: 'none' }after the spread, so a style override is always clobbered.Our first headless integration passed
classNamethroughgetDropzonePropsand lost half an hour to the styling silently going nowhere before we read the dist source.It'd be good if all three getters followed the same contract (spread overrides, compose getter-owned handlers, and document any keys the getter must own). If
display: noneon the input is load-bearing, that's fine — but then dropping/clobbering should at least be documented on the headless guide's prop-getter section.