-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workbench): drag-and-drop body updates
some leftover things to do here: * dropping a file _outside_ the drop zone doesn't cancel the drop overlay. I've added a cancel button for now so users aren't stuck * need to update status indicator
- Loading branch information
Showing
7 changed files
with
126 additions
and
10 deletions.
There are no files selected for viewing
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
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,18 @@ | ||
import React from 'react' | ||
|
||
export interface CalloutBlockProps { | ||
text: string | ||
type: 'info' | 'warning' | ||
|
||
cancelText?: string | ||
onCancel?: () => void | ||
} | ||
|
||
const CalloutBlock: React.FC<CalloutBlockProps> = ({ text, type, cancelText = 'cancel', onCancel }) => ( | ||
<div className={`callout-block ${type}`}> | ||
{onCancel && <a className='cancel' onClick={onCancel}>{cancelText}</a>} | ||
<p className='text'>{text}</p> | ||
</div> | ||
) | ||
|
||
export default CalloutBlock |
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
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
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
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
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