MCPcopy Create free account
hub / github.com/adobe/react-spectrum / SkeletonColorItem

Function SkeletonColorItem

packages/dev/s2-docs/src/colorSearchData.tsx:246–277  ·  view source on GitHub ↗
({item}: {item: {id: string}})

Source from the content-addressed store, hash-verified

244}
245
246function SkeletonColorItem({item}: {item: {id: string}}) {
247 const ref = useRef(null);
248 return (
249 <ListBoxItem
250 id={item.id}
251 value={item}
252 textValue="skeleton"
253 className={skeletonItemStyle}
254 ref={ref}>
255 <div
256 className={skeletonSwatchStyle}
257 style={
258 {
259 width: '48px',
260 height: '48px',
261 backgroundColor: 'var(--s2-gray-200)'
262 } as React.CSSProperties
263 }
264 />
265 <div
266 className={style({
267 maxWidth: 'full',
268 textOverflow: 'ellipsis',
269 overflow: 'hidden',
270 whiteSpace: 'nowrap',
271 textAlign: 'center'
272 })}>
273 <Text styles={style({font: 'ui-sm'})}>Color Name</Text>
274 </div>
275 </ListBoxItem>
276 );
277}
278
279export function ColorSearchSkeleton() {
280 const mockSections = useMemo(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected