Skip to content

Commit

Permalink
feat(Dropdown): add render prop to hte head
Browse files Browse the repository at this point in the history
  • Loading branch information
ej9x committed Jun 28, 2019
1 parent 16a171c commit c857925
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/Button/Button.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ const [ButtonTag, theme] = createThemeTag(name, ({ COLORS, SIZES }: *) => ({
},
ghost: {
backgroundColor: 'transparent',
color: COLORS.BLACK,
},
},

Expand Down
4 changes: 2 additions & 2 deletions src/components/Dropdown/DropdownHead.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const DropdownHead = dropdownHeadEnhancer(
class DropdownHead extends PureComponent<DropdownHeadPropsEnhanced> {

onClick = (event: MouseEvent) => {
const { dropdown: { toggleDropdown }, disabled, stopClickPropagation, onClick } = this.props;
const { dropdown: { toggleDropdown }, disabled, stopClickPropagation, onClick, children } = this.props;

if (!!disabled) {
if (!!disabled || typeof children === 'function') {
return;
}

Expand Down
4 changes: 4 additions & 0 deletions src/components/Dropdown/__snapshots__/Dropdowon.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports[`<Dropdown /> should render dropdown 1`] = `
Object {
"closeDropdown": undefined,
"isOpen": false,
"openDropdown": undefined,
"outsideClickIgnoreClass": "ignore-react-onclickoutside-0",
"targetWidth": undefined,
"toggleDropdown": [Function],
Expand Down Expand Up @@ -85,6 +86,7 @@ exports[`<Dropdown /> should render dropdown 1`] = `
Object {
"closeDropdown": undefined,
"isOpen": false,
"openDropdown": undefined,
"outsideClickIgnoreClass": "ignore-react-onclickoutside-0",
"targetWidth": undefined,
"toggleDropdown": [Function],
Expand All @@ -96,6 +98,7 @@ exports[`<Dropdown /> should render dropdown 1`] = `
Object {
"closeDropdown": undefined,
"isOpen": false,
"openDropdown": undefined,
"outsideClickIgnoreClass": "ignore-react-onclickoutside-0",
"targetWidth": undefined,
"toggleDropdown": [Function],
Expand All @@ -121,6 +124,7 @@ exports[`<Dropdown /> should render dropdown 1`] = `
Object {
"closeDropdown": undefined,
"isOpen": false,
"openDropdown": undefined,
"outsideClickIgnoreClass": "ignore-react-onclickoutside-0",
"targetWidth": undefined,
"toggleDropdown": [Function],
Expand Down

0 comments on commit c857925

Please sign in to comment.