Browse Source

💄 fix span type warning in site

pull/13941/head
afc163 6 years ago
parent
commit
4da04acff9
No known key found for this signature in database GPG Key ID: 738F973FCE5C6B48
  1. 6
      components/grid/__tests__/index.test.js
  2. 2
      site/theme/template/Content/ComponentDoc.jsx

6
components/grid/__tests__/index.test.js

@ -4,7 +4,7 @@ import { Col, Row } from '..';
describe('Grid', () => {
it('should render Col', () => {
const wrapper = render(<Col span="2" />);
const wrapper = render(<Col span={2} />);
expect(wrapper).toMatchSnapshot();
});
@ -14,11 +14,11 @@ describe('Grid', () => {
});
it('renders wrapped Col correctly', () => {
const MyCol = () => <Col span="12" />;
const MyCol = () => <Col span={12} />;
const wrapper = render(
<Row gutter={20}>
<div>
<Col span="12" />
<Col span={12} />
</div>
<MyCol />
</Row>,

2
site/theme/template/Content/ComponentDoc.jsx

@ -117,7 +117,7 @@ export default class ComponentDoc extends React.Component {
</section>
<Row gutter={16}>
<Col
span={isSingleCol ? '24' : '12'}
span={isSingleCol ? 24 : 12}
className={isSingleCol ? 'code-boxes-col-1-1' : 'code-boxes-col-2-1'}
>
{leftChildren}

Loading…
Cancel
Save