sickdyd / react-search-autocomplete

A search box that filters the provided array of objects
https://sickdyd.github.io/react-search-autocomplete
MIT License
216 stars 82 forks source link

I would like to know how create a global Styling prop for the component #76

Closed pedromaironi closed 1 year ago

pedromaironi commented 2 years ago
                <ReactSearchAutocomplete
                  items={products}
                  showIcon={false}
                  onSelect={handleOnSelect}
                  autoFocus={true}
                  styling={{
                    outline: "none",
                    fontWeight: "500",
                    fontSize: "0.9rem",
                    color: "black",
                    cursor: "text",
                    backgroundColor: "white",
                    borderRadius: "5px",
                    height: "1.7rem",
                    border: "1px solid #cfd6e4",
                    width: "100%",
                  }}
                />

I have this and I don't want to have to repeat these 9 lines in every autocomplete I create

dankcellar commented 2 years ago

It would be great if I could remove all style and let Bulma style it for me

sickdyd commented 1 year ago

@pedromaironi

Answered in the previous issue: https://github.com/sickdyd/react-search-autocomplete/issues/74#issuecomment-1257086542