Giter VIP home page Giter VIP logo

react-flexboxgrid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-flexboxgrid's Issues

Tests

This package really needs some tests. Shame, shame, shame.

Normalizing components

I'd be happy to contribute to this project, however you are missing many options from flexboxgrid, and your components are not normalized.

Typically, all grid systems use this format

<Grid>
  <Row>
    <Col />
  </Row>
</Grid>

Where a Grid has a container class and may be fluid. Etc.

Would you be ok if I submit a PR to fix this? I can simply add the missing components, leaving the existing ones there and mark them as deprecated at best. The point is to allow supporting all the features of flexboxgrid, and am I not happy with how react-flexbox-grid depends on Webpack. There is really no need for yet another wrapper...

[Question] Get it importing flexboxgrid.css

It seems that flexboxgrid stays undefined when I import your library.
import flexboxgrid from "flexboxgrid/dist/flexboxgrid.css";

I use postCss with some loaders and wonder, which loader is needed to get your lib running.
I saw postcss-js as dependency, but it's not used in your webpack config.

Could you explain which loader is needed?

Meteor support

The issue with Meteor is that, while it does import the CSS as a style tag to the document, the exported module is simply a STYLE DOM element, and using the components in Meteor + React does not work, resulting in <div class=" ">...</div> elements to be created (instead lf <div class="row">...</div>).

My suggestion would be to temporarily implement a CSS map adapter to assign CSS classes to the elements depending on the selected "mode".

For example

import FlexboxGrid from 'react-flexboxgrid';
import { standardStyles, cssModuleStyles } from 'react-flexboxgrid/lib/adapters';

FlexboxGrid.styleAdapter = standardStyles;
// or
FlexboxGrid.styleAdapter = cssModuleStyles;

By default, the adapter used is cssModuleStyles.

standardStyles

Simply is an identity function :

import 'flexboxgrid/dist/flexboxgrid.css';

export default function (className) { return className; }

cssModuleStyles

Returns the styles loader class name :

import flexboxgrid from 'flexboxgrid/dist/flexboxgrid.css';

export default function (className) { return flexboxgrid[className]; }

Then simply use the defined adapter in each component.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.