This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move page overview to sidebar (#554)
* fix: rename preview-tile to page-tile * feat: move pages to left sidebar * feat: update styling of page tile * feat: update styling of add page button * fix: remove unneeded page view code * fix: set app focus on page or element selection * fix: don’t remove last page * feat: introduce element and page focus state * fix: use focus-item object to handle type * feat: add focus styling for page tile * feat: add focused state to elements * fix: update styling of focused page tile * fix: fix minor styling fixes * feat: add option to hide page sidebar * fix: set focused item on project open * fix: make root element not editable * fix: show default cursor on non-editable elements * fix: update add button demo * fix: rename add page to add page button * fix: remove unneeded code * fix: update menu item names * fix: use capabilities for elements * fix: solve merge conflict
- Loading branch information
Showing
30 changed files
with
375 additions
and
363 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import DemoContainer from '../demo-container'; | ||
import * as React from 'react'; | ||
import { AddPageButton } from '.'; | ||
|
||
const AddPageButtonDemo: React.StatelessComponent = (): JSX.Element => ( | ||
<DemoContainer title="Add Page Button"> | ||
<AddPageButton /> | ||
</DemoContainer> | ||
); | ||
|
||
export default AddPageButtonDemo; |
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,45 @@ | ||
import * as React from 'react'; | ||
import { Color } from '../colors'; | ||
import { Copy } from '../copy'; | ||
import { getSpace, SpaceSize } from '../space'; | ||
import { Icon, IconName, IconSize } from '../icons'; | ||
import styled from 'styled-components'; | ||
|
||
export interface AddPageButtonProps { | ||
onClick?: React.MouseEventHandler<HTMLElement>; | ||
} | ||
|
||
const StyledAddPageButton = styled.button` | ||
position: relative; | ||
box-sizing: border-box; | ||
height: 60px; | ||
width: 100%; | ||
border: 1px solid ${Color.Grey80}; | ||
border-radius: 6px; | ||
background-color: transparent; | ||
margin: ${getSpace(SpaceSize.S)}px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
transition: border 0.2s; | ||
user-select: none; | ||
&:focus { | ||
outline: none; | ||
} | ||
&:hover { | ||
border: 1px solid ${Color.Grey60}; | ||
} | ||
`; | ||
|
||
const StyledIcon = styled(Icon)` | ||
margin-right: ${getSpace(SpaceSize.XS)}px; | ||
`; | ||
|
||
export const AddPageButton: React.SFC<AddPageButtonProps> = props => ( | ||
<StyledAddPageButton onClick={props.onClick}> | ||
<StyledIcon name={IconName.Plus} size={IconSize.XS} color={Color.Grey60} /> | ||
<Copy textColor={Color.Grey50}>Add Page</Copy> | ||
</StyledAddPageButton> | ||
); |
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,8 @@ | ||
{ | ||
"name": "add-page-button", | ||
"description": "Button to add pages", | ||
"displayName": "Add Page Button", | ||
"version": "1.0.0", | ||
"tags": ["atom", "button"], | ||
"flag": "alpha" | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.