Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(sub components): export at the top level #519

Closed
nicolo-paganin opened this issue Sep 20, 2016 · 2 comments
Closed

refactor(sub components): export at the top level #519

nicolo-paganin opened this issue Sep 20, 2016 · 2 comments

Comments

@nicolo-paganin
Copy link

nicolo-paganin commented Sep 20, 2016

The module is not working with the optimization module Babel transform-react-inline-elements.

The reasn is this one https://github.com/thejameskyle/babel-react-optimize/issues/19.

In order to get it working you have to import directly the submodule. For example for the Menu component

import Menu, {MenuItem, MenuMenu, MenuHeader} from 'stardust/dist/collections/Menu/Menu'

This is not working in this moment becase the submodules are not exported.

The proposed modification is to export also the submodules like this (dist/collections.Menu/Menu.js:182):

`
Menu._meta = _meta;

Menu.autoControlledProps = ['activeIndex'];
exports.Header = Menu.Header = _MenuHeader2.default;
exports.Item = Menu.Item = _MenuItem2.default;
exports.Menu = Menu.Menu = _MenuMenu2.default;
exports.default = Menu;
`

Thanks

@levithomason
Copy link
Member

levithomason commented Sep 20, 2016

I'd accept a PR for exporting sub components. Should be rather easy, just add them to each index.js file in src/* folder.

There may be some automated testing considerations to update that I'm not seeing.

@levithomason levithomason changed the title Not working with Babel transform-react-inline-elements refactor(sub components): export at the top level Sep 20, 2016
@levithomason
Copy link
Member

Released in stardust@0.47.1, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants