File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
packages/@react-spectrum/dropzone/chromatic Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2023 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import { Button } from '@react-spectrum/button' ;
14
+ import { DropZone , SpectrumDropZoneProps } from '../' ;
15
+ import { FileTrigger , Text } from 'react-aria-components' ;
16
+ import { Heading } from '@react-spectrum/text' ;
17
+ import { IllustratedMessage } from '@react-spectrum/illustratedmessage' ;
18
+ import { Meta } from '@storybook/react' ;
19
+ import React from 'react' ;
20
+ import Upload from '@spectrum-icons/illustrations/Upload' ;
21
+
22
+ const meta : Meta < SpectrumDropZoneProps > = {
23
+ title : 'DropZone' ,
24
+ component : DropZone
25
+ } ;
26
+
27
+ export default meta ;
28
+
29
+ export const Default = {
30
+ args : {
31
+ children : (
32
+ < >
33
+ < IllustratedMessage >
34
+ < Upload />
35
+ < Heading >
36
+ < Text slot = "label" >
37
+ Drag and drop here
38
+ </ Text >
39
+ </ Heading >
40
+ </ IllustratedMessage >
41
+ </ >
42
+ )
43
+ }
44
+ } ;
45
+
46
+ export const WithFileTrigger = {
47
+ args : {
48
+ children : (
49
+ < >
50
+ < IllustratedMessage >
51
+ < Upload />
52
+ < Heading >
53
+ < Text slot = "label" >
54
+ Drag and drop here
55
+ </ Text >
56
+ </ Heading >
57
+ < FileTrigger >
58
+ < Button variant = "primary" > Select a file</ Button >
59
+ </ FileTrigger >
60
+ </ IllustratedMessage >
61
+ </ >
62
+ )
63
+ }
64
+ } ;
You can’t perform that action at this time.
0 commit comments