-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
@@ -1,4 +1,6 @@ | |||
import React, { Component, PropTypes } from 'react'; | |||
import React, { Component } from 'react'; | |||
import PropTypes from 'prop-types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
const SlidingPanelHeader = ({ title }) => { | ||
if (!title) { | ||
return <noscript />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik could be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was null
in my first implementation. But then I stuck with testing, it causes this error. Seems like unless we migrated to React 15 we still need to use noscript
. By the way, I've searched other components and found many places where we also use noscript
. Once we migrated I think could be nice to get rid of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asci it is only available on React 15:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget every time:D When we'll migrate?
@@ -8,19 +8,20 @@ describe('SlidingPanel', () => { | |||
describe('#render()', () => { | |||
it('render with default props and mods provided', () => { | |||
const renderTree = mount( | |||
<SlidingPanel mods={['test']}>Test</SlidingPanel> | |||
<SlidingPanel mods={['test']} title="Test Title">Test</SlidingPanel> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not default props
, please add new test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. Got it. Will do now
WHAT DOES THIS PR DO:
slidingPanelHeader
component (for now internally, insideslidingPanel
).title
toslidingPanel
component. If it's defined we do show header.slidingPanel
component is changed to support multiple close buttons.SCREENSHOT:
WHERE SHOULD THE REVIEWER START:
UNIT TESTS: