OneDrive / samples

Contains samples, scenarios, and guidance for integrating with OneDrive and SharePoint drives, drive items, and files.
MIT License
49 stars 48 forks source link

FileBrowser: Theme support? #54

Closed ottD closed 6 months ago

ottD commented 9 months ago

Is your feature request related to a problem? Please describe. I've been using the FileBrowser component and find it frustrating that there does not seem to be a documented way to set the Theme. There is nothing in the Browser Configuration object and passing additional query string parameters such as &theme=dark does not work.

Describe the solution you'd like I'd like to know whether and how the FileBrowser can be rendered using a different Theme. Either by passing the Theme in the Browser Configuration options or through an additional query string parameter.

Describe alternatives you've considered I've tried adding additional query string parameters such as. &theme=dark.

Additional context The code samples and File Browser documentation do not show how to render the FileBrowser with a different Theme. Can the documentation or samples be updated to cover this scenario?

patrick-rodgers commented 9 months ago

Thank you for the question, we've logged it with the engineering team.

ottD commented 8 months ago

@patrick-rodgers Do you have any update regarding theme support in the File Browser component? Thanks

JCrew0 commented 6 months ago

@ottD Sorry for the delay here. I'm working on adding to the configuration here: File Browser Configuation. You should just be able to add to your config: theme?: 'default' | 'dark' | 'lists' | 'teams' | 'teams-default' | 'teams-dark' | 'teams-contrast'

JCrew0 commented 6 months ago

Updated the docs!

ottD commented 6 months ago

Thanks for updating the docs! I can confirm that adding the theme string to the file browser configuration JSON works as expected 👍

rgcircum commented 6 months ago

@ottD Thanks for updating. Is possible to pass SharePoint theme name to pass correct color sheme (custom theme), not default SP Theme ?

PS : theme param work also on filePicker ;) (doc not updated)

JCrew0 commented 6 months ago

@rgcircum You'd have to pass it as a theme object. However, I haven't added any documentation for that yet. I'll add some in the future, but it might take some time.

Yeah, myself or one of my team members will be editing the file picker docs.

I can ping you here once we update the documentations for custom themes and for the file picker.

rgcircum commented 6 months ago

@JCrew0 nice! it's work perfectly !!!

MrKSchmitz commented 3 months ago

The 'default' | 'dark' | 'lists' themes seem to work as expected. The 'teams' | 'teams-default' | 'teams-dark' | 'teams-contrast' do not seem to work.

Are there additional config parameters or query string parameters to enable the Teams specific theming?