From 1ac4f59c251c7656700e3611541cb97cf77b9e43 Mon Sep 17 00:00:00 2001 From: emyarod Date: Thu, 6 Feb 2020 16:45:18 -0600 Subject: [PATCH] docs(file-uploader): show legacy file uploader in vanilla docs (#5265) --- .../file-uploader/file-uploader.config.js | 17 +++++++ .../file-uploader/file-uploader.hbs | 51 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/packages/components/src/components/file-uploader/file-uploader.config.js b/packages/components/src/components/file-uploader/file-uploader.config.js index c5bc4070d93c..e98abd56be6a 100644 --- a/packages/components/src/components/file-uploader/file-uploader.config.js +++ b/packages/components/src/components/file-uploader/file-uploader.config.js @@ -29,5 +29,22 @@ module.exports = { exampleUploadStates: true, }, }, + { + name: 'legacy', + label: 'Legacy file uploader', + context: { + id: 'legacy-file-uploader', + legacy: true, + }, + }, + { + name: 'legacy with example upload states', + label: 'Legacy file uploader with example upload states', + context: { + id: 'legacy-file-uploader-states', + legacy: true, + exampleUploadStates: true, + }, + }, ], }; diff --git a/packages/components/src/components/file-uploader/file-uploader.hbs b/packages/components/src/components/file-uploader/file-uploader.hbs index 7f49f8c8e9fd..0ebce39416ba 100644 --- a/packages/components/src/components/file-uploader/file-uploader.hbs +++ b/packages/components/src/components/file-uploader/file-uploader.hbs @@ -5,6 +5,7 @@ LICENSE file in the root directory of this source tree. --> +{{#unless legacy}}
Account photo @@ -57,3 +58,53 @@
+{{else}} +
+ Account + photo +

Only .jpg and .png files. 500kb max file size.

+
+ + +
+ {{#if exampleUploadStates}} +
+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Libero vero + sapiente illum reprehenderit molestiae perferendis voluptatem temporibus laudantium ducimus magni voluptatum + veniam, odit nesciunt corporis numquam maxime sunt excepturi sint!

+ + {{ carbon-icon 'CheckmarkFilled16' class=(add prefix '--file-complete') }} + +
+
+

color.jpeg

+ + {{ carbon-icon 'WarningFilled16' class=(add prefix '--file--invalid')}} + {{ carbon-icon 'Close16' class=(add prefix '--file-close') aria-label="Remove uploaded file" tabindex="0" }} + +
+
File size exceeds limit.
+

500 kb max file size. Select a new file and try + again.

+
+
+
+

color.jpeg

+ +
+
+ + + + +
+
+
+
+ {{/if}} +
+
+
+{{/unless}}