Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Expose theme used through ResponseRenderer props #131

Open
woozyking opened this issue Aug 13, 2024 · 1 comment
Open
Labels
new feature New feature to add to core product

Comments

@woozyking
Copy link

woozyking commented Aug 13, 2024

This would be a great addition to allow developers to adapt ResponseRenderer implementations to take advantage of the theme in use.

For instance, with such exposure, one can do something like:

const RTaiResponseRenderer: ResponseRenderer<string> = (props) => {
  const isDarkTheme = props.theme === 'dark';

  const styles = {
    container: {
      padding: '20px',
      backgroundColor: isDarkTheme ? '#1e1e1e' : '#ffffff',
      color: isDarkTheme ? '#ffffff' : '#000000',
    },
    content: {
      marginBottom: '20px',
      backgroundColor: isDarkTheme ? '#ffffff' : '#1e1e1e',
      color: isDarkTheme ? '#000000' : '#ffffff',
    },
    ...
  };

  return (
    <div style={styles.container}>
      <div style={styles.content}>
        <Markdown>{props.content}</Markdown>
      </div>
      ...other stuff
    </div>
  );
};
@salmenus salmenus added the new feature New feature to add to core product label Aug 15, 2024
@salmenus
Copy link
Member

Nice suggestion @woozyking
I had that use-case as well, while implementing an app that uses NLUX
We'll prioritize it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature to add to core product
Projects
None yet
Development

No branches or pull requests

2 participants