uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
298 stars 144 forks source link

Different style than on demo app #159

Closed serek8 closed 3 years ago

serek8 commented 3 years ago

Hey, the app seems to differ than the one on demo. I think it might be an issue with styles but no idea how to fix it. Here are the diffs:

jlo-1 commented 3 years ago

Hi @serek8, the styles on the demo app are imported from the uptick-demo-site repository.

You can see it being imported for the demo-site here

You'll have to apply your own custom css to your application if you wish to customise the style of the file-browser past what is already implemented in this repo.

Cheers

ghost commented 3 years ago

You'll have to apply your own custom css to your application if you wish to customise the style of the file-browser past what is already implemented in this repo.

Hey, @jlo-1! Can you show some little showcase regarding applying custom css? For now, i see that the element i want to customize doesn't have a class: https://github.com/uptick/react-keyed-file-browser/blob/eb1bb8cacd479713dfa799c2ed5a381c426bac13/src/actions/default.js#L138 ...so I can't apply any styles to it. Any thoughts on this? Maybe we could add className to it?

Any help would be appreciated🙏

jlo-1 commented 3 years ago

Hi @EPishchalnikov, the Actions component provided with the package is just a default, what i would suggest is creating your own NewActions component, copy the default into it as a start and then make modifications to it as you so please, from there you could add classnames wherever you need and apply styling.

Then, you can pass the new NewActions component into the FileBrowser component as a prop which will override the default.

Hope this helps Cheers