-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from sitegeist/feature/push-preview-on-props-i…
…nspector FEATURE: Shrink the preview frame when props pane is open
- Loading branch information
Showing
9 changed files
with
3,623 additions
and
3,487 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
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
7 changes: 5 additions & 2 deletions
7
Resources/Private/JavaScript/containers/styleguide/main/preview-frame/style.css
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
.frame { | ||
position: relative; | ||
flex-grow: 1; | ||
flex-basis: 0; | ||
transition: width .3s, min-width .3s, transform .3s, left .3s; | ||
} | ||
|
||
.isLocked { | ||
position: relative; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
transition: width .3s, transform .3s; | ||
} |
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
24 changes: 24 additions & 0 deletions
24
Resources/Private/JavaScript/state/props-inspector/index.js
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,24 @@ | ||
import {createAction} from 'redux-actions'; | ||
import {$get, $toggle} from 'plow-js'; | ||
|
||
export const actions = {}; | ||
|
||
actions.toggle = createAction( | ||
'@sitegeist/monocle/props-inspector/toggle' | ||
); | ||
|
||
export const reducer = (state, action) => { | ||
switch (action.type) { | ||
case actions.toggle.toString(): | ||
return $toggle('propsInspector.isOpen', state); | ||
|
||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
export const selectors = {}; | ||
|
||
selectors.isOpen = $get('propsInspector.isOpen'); | ||
|
||
export const sagas = {}; |
Oops, something went wrong.