bloomer
bloomer copied to clipboard
Make it more modular
Hello, I really like bulma and this is really nice soluton to using it with React, but... Including every component on it's own just so you can use it make some pretty long inports:
import { Field as Bfield, Form, Input, Group, Label, Control, Checkbox, Textarea, Select } from 'bloomer'
Instead why don't you make it modular, so it can be simplier like this
import { Form } from 'bloomer'
...
<Form>
<Form.Field>
<Form.Input />
</Form.Field>
<Form>
This goes for Form, Nav, Navbar, Columns, Hero, Cards and basically everything.
Here's a pseudo example on Forms and how it could be done:
...
import FormCheckbox from './Form/Checkbox'
import FormField from './Form/Field/Field'
import FormInput from './Form/Input'
import FormLabel from './Form/Label'
import FormRadio from './Form/Radio'
import FormSelect from './Form/Select'
import FormTextArea from './Form/TextArea'
....
class Form extends Component {
...
static Field = FormField
static Checkbox = FormCheckbox
static Input = FormInput
static Radio = FormRadio
static Select = FormSelect
static TextArea = FormTextArea
static Label = FormLabel
....
}
Can you give a description? Maybe an example?
Thanks.
Best example I could give you is Semantic-UI-React.