diff --git a/package-lock.json b/package-lock.json index 2b9cff338e9..c4eeafed30a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -158,7 +158,7 @@ "mime": "2.2.0", "p-reduce": "1.0.0", "parse-github-url": "1.0.2", - "url-join": "2.0.2" + "url-join": "2.0.3" }, "dependencies": { "debug": { @@ -14703,7 +14703,7 @@ "p-retry": "1.0.0", "semver": "5.4.1", "update-notifier": "2.3.0", - "url-join": "2.0.2", + "url-join": "2.0.3", "yargs": "10.1.1" }, "dependencies": { @@ -15028,9 +15028,9 @@ } }, "url-join": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.2.tgz", - "integrity": "sha1-wHJ1aWetJLi1nldBVRyqx49QuLc=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.3.tgz", + "integrity": "sha1-Fdsf3ekFZRw6Ihp42l/rj8gJ03I=", "dev": true }, "url-loader": { diff --git a/src/components/Filter/Filter.js b/src/components/Filter/Filter.js index ba9b048c018..d1e97833025 100644 --- a/src/components/Filter/Filter.js +++ b/src/components/Filter/Filter.js @@ -1,9 +1,19 @@ import cx from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; +import { getContext } from 'recompose'; +import { toolbarContextTypes } from '../Toolbar/ToolbarConstants'; + +// Disabled eslint due to `isDescendantOfToolbar` being a context property we don't want passed by consumers +const Filter = ({ children, className, isDescendantOfToolbar, ...rest }) => { // eslint-disable-line + const classes = cx( + { + 'filter-pf form-group': true, + 'toolbar-pf-filter': isDescendantOfToolbar + }, + className + ); -const Filter = ({ children, className, ...rest }) => { - const classes = cx('filter-pf form-group', className); return (
{children}
; +}; + +FilterActiveLabel.propTypes = { + /** Children nodes */ + children: PropTypes.node, + /** Additional css classes */ + className: PropTypes.string +}; + +export default FilterActiveLabel; diff --git a/src/components/Filter/FilterItem.js b/src/components/Filter/FilterItem.js new file mode 100644 index 00000000000..d344afc5cd7 --- /dev/null +++ b/src/components/Filter/FilterItem.js @@ -0,0 +1,38 @@ +import cx from 'classnames'; +import React from 'react'; +import PropTypes from 'prop-types'; + +const FilterItem = ({ children, className, onRemove, filterData, ...rest }) => { + const classes = cx(className); + + return ( +{mockSortExampleSource}
+ {mockToolbarExampleSource}
+