-
Notifications
You must be signed in to change notification settings - Fork 1
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
a10c36a
commit bdd12cc
Showing
7 changed files
with
272 additions
and
19 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,38 @@ | ||
import { css } from '@emotion/css' | ||
import { ReactComponent as EmptyStateIcon } from './emptyState.svg' | ||
import React from 'react' | ||
import tokens from '@contentful/f36-tokens' | ||
|
||
const styles = { | ||
emptyContainer: css({ | ||
height: '200px', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
flexDirection: 'row', | ||
color: tokens.gray500, | ||
fontSize: tokens.fontSizeM, | ||
fontFamily: tokens.fontStackPrimary, | ||
border: `1px dashed ${tokens.gray500}`, | ||
'&:hover': { | ||
border: `1px dashed ${tokens.blue500}`, | ||
backgroundColor: tokens.blue100, | ||
}, | ||
}), | ||
icon: css({ | ||
marginLeft: tokens.spacingS, | ||
}), | ||
} | ||
|
||
export const EmptyContainer = ({ onComponentDropped }: any) => { | ||
return ( | ||
<div | ||
className={styles.emptyContainer} | ||
onMouseUp={() => { | ||
onComponentDropped({ node: { data: { id: 'root' } } }) | ||
}}> | ||
<EmptyStateIcon /> | ||
<span className={styles.icon}>Add components to begin</span> | ||
</div> | ||
) | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.