Skip to content

Commit

Permalink
Merge pull request #12 from kadirahq/fix-2
Browse files Browse the repository at this point in the history
Change the Screen when user not logged in #2
  • Loading branch information
arunoda authored Oct 7, 2016
2 parents 4e0cf5f + cb38792 commit a01333d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .storybook/addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
// Use the line below to register this addon
// import '@kadira/storybook-addon-comments/register';
import '@kadira/storybook-database-cloud/register';
import '../register';
import { init } from '../src/manager';
init();
3 changes: 2 additions & 1 deletion src/manager/components/CommentsPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import style from './style';
export default class CommentsPanel extends Component {
render() {
if (!this.props.user) {
const signInUrl = `https://hub.getstorybook.io/sign-in?redirectUrl=${encodeURIComponent(location.href)}`;
return (
<div style={style.wrapper}>
<div style={style.message}>
<a style={style.button} href="https://storybooks.io">login @ storybooks.io</a>
<a style={style.button} href={signInUrl}>SignIn with Storybook Hub</a>
</div>
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion src/manager/components/CommentsPanel/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export default {
},
button: {
textDecoration: 'none',
color: 'rgb(120, 120, 120)',
color: '#444',
padding: '10px 18px',
background: 'rgb(240, 240, 240)',
borderRadius: 5,
textTransform: 'none',
fontSize: 12,
},
}

0 comments on commit a01333d

Please sign in to comment.