-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MM-10017] Added support to override right-hand sidebar (#31)
* Added RHS component that is triggered by the channel header action button * Added plugin name as title for RHS and passed plugin id to RHS action * Updated Readme with RHS Component documentation * Update typo webapp/README.md Co-Authored-By: Christopher Speller <crspeller@gmail.com> * Added binding to RHS plug action * Receive RHS action from registry function * Updated name of action received for RHS * Removed unused import
- Loading branch information
1 parent
84423d0
commit 2d82613
Showing
8 changed files
with
64 additions
and
5 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
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
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,11 @@ | ||
import {connect} from 'react-redux'; | ||
|
||
import {isEnabled} from 'selectors'; | ||
|
||
import RHSView from './rhs_view'; | ||
|
||
const mapStateToProps = (state) => ({ | ||
enabled: isEnabled(state), | ||
}); | ||
|
||
export default connect(mapStateToProps)(RHSView); |
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,34 @@ | ||
import React from 'react'; | ||
|
||
import {FormattedMessage} from 'react-intl'; | ||
|
||
export default class RHSView extends React.PureComponent { | ||
render() { | ||
return ( | ||
<div style={style.rhs}> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<FormattedMessage | ||
id='rhs.triggered' | ||
defaultMessage='You have triggered the right-hand sidebar component of the demo plugin.' | ||
/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<FormattedMessage | ||
id='demo.testintl' | ||
defaultMessage='This is the default string' | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
const style = { | ||
rhs: { | ||
padding: '10px', | ||
}, | ||
}; |
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