wix-style-react
Version:
39 lines (38 loc) • 1.43 kB
JavaScript
export default {
description:
'The file picker allows users to upload a single file at a time. The component handles the file upload via the native file browser dialog, the validation and preview of an uploaded file.',
do: [
'Use it to upload text or media file',
'Use it to upload single file at a time',
],
dont: [
"Don't use it if you need to upload multiple files at once, use <FileUpload/> instead.",
],
featureExamples: [
{
title: 'Structure',
description: `File upload consists of two labels: \`mainLabel\` for action text and \`subLabel\` for a description.`,
example: '_structure',
},
{
title: 'Supported formats',
description: `Define file types that could be uploaded with the \`supportedFormats\` prop. Separate formats with a comma.`,
example: '_supportedformats',
},
{
title: 'Max size',
description: `Define the maximum file size for an upload with the \`maxSize\` prop.`,
example: '_maxSize',
},
{
title: 'Error message',
description: `Describe an error status by using the \`errorMessage\` prop. Messages will only be revealed when the \`error\` status is \`true\`.`,
example: '_errorMessage',
},
{
title: 'Header',
description: `Add text or any other component in an area above the component using the \`header\` prop.`,
example: '_header',
},
],
};