1.2.1 • Published 5 years ago

meteor-import-antd v1.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

meteor-import-antd

A workaround for whom wants to use antd with meteor.

Why ?

please refer to this meteor/babel issue

The purpose of this package is to free you of double imports per component (the component by itself plus its style). By using it, you'll just need one import.

How to use it ?

import Skeleton from 'meteor-import-antd/Skeleton';

instead of recommanded :

import 'antd/lib/skeleton/style/index.css';
import Skeleton from 'antd/lib/skeleton';

By the way, you'll also have to import global styles by yourself on a top level component, or in a GlobalStyle if you use styled-component :

import { createGlobalStyle } from 'styled-components';
import antdReset from 'antd/lib/style/v2-compatible-reset.css';
import antdStyle from 'antd/lib/style/index.css';

const GlobalStyle = createGlobalStyle`
  ${antdStyle}
  ${antdReset}
`;

export default GlobalStyle;
1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago