MCPcopy Create free account
hub / github.com/editablejs/editable / renderUploading

Function renderUploading

packages/plugins/image/src/components/image.tsx:127–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125 const isUploading = state === 'uploading' || state === 'waitingUpload'
126
127 const renderUploading = () => {
128 if (!isUploading) return null
129 return (
130 <div tw="absolute left-0 top-0 w-full h-full flex justify-center items-center text-primary">
131 {percentage !== undefined && (
132 <div
133 css={[
134 tw`w-1/3 h-2 rounded bg-gray-400/30 relative overflow-hidden`,
135 css`
136 min-width: 8px;
137 `,
138 ]}
139 >
140 <div
141 tw="absolute left-0 top-0 h-full bg-primary animate-pulse"
142 style={{ width: `${percentage}%` }}
143 ></div>
144 </div>
145 )}
146 {percentage === undefined && <Icon name="loading" />}
147 </div>
148 )
149 }
150
151 const renderLoading = () => {
152 if (!loading || loaded) return null

Callers 1

image.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…