Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
GridContainer full / fluid generates render warning from React (#55) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bobwalker99 authored and crisu83 committed Mar 2, 2018
1 parent bd04998 commit 9348c54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/xy-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const GridContainer = (props) => {
generalClassNames(props)
);

const passProps = removeProps(props, objectKeys(Grid.propTypes));
const passProps = removeProps(props, objectKeys(GridContainer.propTypes));

return <div {...passProps} className={className}/>;
};
Expand Down
11 changes: 6 additions & 5 deletions test/components/xy-grid-spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { render } from 'enzyme';
import { render, shallow } from 'enzyme';
import { expect } from 'chai';
import { GutterTypes, ExtendedBreakpoints } from '../../src/enums'
import { GutterTypes, ExtendedBreakpoints } from '../../src/enums';
import { GridContainer, Grid, Cell } from '../../src/components/xy-grid';

describe('GridContainer component', () => {
Expand All @@ -27,15 +27,16 @@ describe('GridContainer component', () => {
});

it('sets fluid', () => {
const component = render(<GridContainer fluid/>);
const component = shallow(<GridContainer fluid/>);
expect(component).to.have.className('fluid');
expect(component).to.not.have.prop('fluid');
});

it('sets full', () => {
const component = render(<GridContainer full/>);
const component = shallow(<GridContainer full/>);
expect(component).to.have.className('full');
expect(component).to.not.have.prop('full');
});

});

describe('Grid component', () => {
Expand Down

0 comments on commit 9348c54

Please sign in to comment.