Skip to content

Commit

Permalink
[default-login] Allow sending a React node as prop to title and descr…
Browse files Browse the repository at this point in the history
…iption (#350)
  • Loading branch information
skogsmaskin committed Nov 10, 2017
1 parent 6d83d9a commit 6656fc1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions packages/@sanity/default-login/src/LoginDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ const GoogleLogo = () => (

export default class LoginDialog extends React.Component {
static propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string,
title: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]).isRequired,
description: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
sanityLogo: PropTypes.node,
projectId: PropTypes.string
};
Expand Down
10 changes: 8 additions & 2 deletions packages/@sanity/default-login/src/LoginWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ export default class LoginWrapper extends React.PureComponent {
PropTypes.node,
PropTypes.func
]).isRequired,
title: PropTypes.string,
description: PropTypes.string,
title: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
description: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
sanityLogo: PropTypes.node
}

Expand Down

0 comments on commit 6656fc1

Please sign in to comment.