File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 11// LICENSE : MIT
22"use strict" ;
3- import React , { Component , PropTypes } from 'react' ;
3+ import React from 'react' ;
44
5- export default class TogglePattern extends Component {
5+ export default class TogglePattern extends React . Component {
66 getFlagNames ( ) {
77 return Object . keys ( this . props ) ;
88 }
99
10- getUnMatchedComponent ( ) {
11- const children = [ ] . concat ( this . props . children ) ;
12- const flagKeyNames = this . getFlagNames ( ) ;
13- return children . filter ( child => {
14- const childKeys = Object . keys ( child . props ) ;
15- return childKeys . some ( childKey => {
16- return flagKeyNames . indexOf ( childKey ) == - 1 ;
17- } ) ;
18- } ) ;
19- } ;
20-
2110 getMatchedComponent ( ) {
2211 const children = [ ] . concat ( this . props . children ) ;
2312 const flagKeyNames = this . getFlagNames ( ) ;
You can’t perform that action at this time.
0 commit comments