react-grid-system icon indicating copy to clipboard operation
react-grid-system copied to clipboard

Feature: Support local configuration

Open zhaoyao91 opened this issue 4 years ago • 3 comments

Currently the configuration is global. But in an app, there may be different grid config requirements.

Could you please offer something like GridConfigContext or fully support all config in individual components?

zhaoyao91 avatar Nov 25 '19 08:11 zhaoyao91

I did PR for smth like this, but nobody reacted, it can be extended to make what you want https://github.com/sealninja/react-grid-system/pull/113

samsonovkirill avatar Nov 25 '19 08:11 samsonovkirill

I'm kind of wondering how many people need this, as it is adding quite some complexity. Also, the PR is only about the grid columns, and I don't see much need for that, as no one is stopping you from using <Col xs={1.5}>. What could make sense though is a configuration context, which completely replaces the current configuration approach, but that would require quite some refactoring at this point.

gerbenmeyer avatar Nov 25 '19 09:11 gerbenmeyer

I'm kind of wondering how many people need this, as it is adding quite some complexity. Also, the PR is only about the grid columns, and I don't see much need for that, as no one is stopping you from using <Col xs={1.5}>. What could make sense though is a configuration context, which completely replaces the current configuration approach, but that would require quite some refactoring at this point.

I'm looking for this functionality for my project, as our design system uses a different number of columns for different device types

mryechkin avatar Apr 03 '20 16:04 mryechkin