Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
125dc41
commit c5e8102
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/sanity/src/core/form/inputs/files/__workshop__/UploadPlaceholderStory.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {Button, Card, Container, Flex} from '@sanity/ui' | ||
import React from 'react' | ||
import {UploadPlaceholder} from '../common/UploadPlaceholder' | ||
|
||
export default function UploadPlaceholderStory() { | ||
return ( | ||
<Flex align="center" height="fill" justify="center" padding={3}> | ||
<Container width={1}> | ||
<Card> | ||
<UploadPlaceholder | ||
accept="image/*" | ||
acceptedFiles={[{name: 'foo.jpg', type: 'image/jpeg'}]} | ||
browse={<Button text="Browse btn" mode="ghost" />} | ||
directUploads | ||
hoveringFiles={[{name: 'foo.jpg', type: 'image/jpeg'}]} | ||
onUpload={() => null} | ||
readOnly={false} | ||
rejectedFilesCount={0} | ||
type="image" | ||
/> | ||
</Card> | ||
</Container> | ||
</Flex> | ||
) | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/sanity/src/core/form/inputs/files/__workshop__/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {defineScope} from '@sanity/ui-workshop' | ||
import {lazy} from 'react' | ||
|
||
export default defineScope({ | ||
name: 'sanity/form/files', | ||
title: 'Files', | ||
stories: [ | ||
{ | ||
name: 'upload-placeholder', | ||
title: 'UploadPlaceholder', | ||
component: lazy(() => import('./UploadPlaceholderStory')), | ||
}, | ||
], | ||
}) |
c5e8102
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
test-studio – ./
test-studio-git-next.sanity.build
test-studio.sanity.build