sasza2 / arrows

MIT License
60 stars 11 forks source link

currently className is being used as a prefix not a className #52

Open AnthonyCrowcroft opened 1 year ago

AnthonyCrowcroft commented 1 year ago

Currently, the className is being applied to the front of all classes in the same way a prefix would and this is preventing me from having a direct target to do things with the path. would you be open to a PR with a breaking change className to being a wrapping class and the current className approach being used as a prefix?

sasza2 commented 1 year ago

I think we can do it without breaking change by adding possibility to pass "className" as object like:

className: {
  container: 'arrow',
  path: 'my-path',
  head: 'my-custom-head',
}

and of course it would be still possible to pass string as className (it would work as before)

what do you think about it?

AnthonyCrowcroft commented 1 year ago

yea I think that would work well we should probably prevent className from running into the existing className as well so people aren't adding trailing spaces everywhere and that might break some existing use cases...