samdenty / console-feed

Captures console.log's into a React Component 🔥
https://stackblitz.com/~/github.com/samdenty/console-feed
MIT License
670 stars 109 forks source link

Console is not re-rendering when trying to change font or theme #83

Open pratik-pdw opened 3 years ago

pratik-pdw commented 3 years ago

When trying to rerender the console the component the variant, BASE_FONT_FAMILY, BASE_FONT_SIZE are note getting affected.

<div style={{ backgroundColor: '#242424' }}>
            <Console
              style={{ fontFamily }}
              styles={{
                BASE_FONT_FAMILY: 'Cousine',
                BASE_FONT_SIZE: fontSize,
                OBJECT_VALUE_STRING_COLOR: '#D0273D',
                LOG_RESULT_COLOR: '#000000',
                BASE_COLOR: theme.toLowerCase() === 'light' ? '#000000' : '#ffffff',
                LOG_COLOR: theme.toLowerCase() === 'light' ? '#000000' : '#ffffff',
                BASE_BACKGROUND_COLOR: 'transparent',
                LOG_BACKGROUND: 'transparent',
              }}
              logs={this.state.logs} variant={theme.toLowerCase()} />
          </div>

theme can have values 'light' & 'dark'