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

Panels using gradient are not showing the gradient in non dev environments. #362

Closed
ischolten opened this issue Oct 30, 2019 · 0 comments · Fixed by influxdata/influxdb#15820
Assignees
Labels
kind/bug Something isn't working

Comments

@ischolten
Copy link

ischolten commented Oct 30, 2019

Screen Shot 2019-10-29 at 4 37 24 PM

The current work around is adding a style:

  <Panel
    gradient={Gradients.HotelBreakfast}
    style={{
      background:
        'linear-gradient(45deg, rgb(107, 223, 255) 0%, rgb(165, 243, 180) 100%)',
    }}
  >

It looks like the minified clockface is not getting compiled correctly.

Relevant minified code

Fs = n.forwardRef(function(e, n) {
                var r, o = e.id, i = e.style, a = e.testID, u = void 0 === a ? "panel" : a, l = e.gradient, c = e.children, f = e.className, d = e.onDismiss, p = e.backgroundColor, h = void 0 === p ? t.InfluxColors.Castle : p, m = e.dismissButtonColor, v = void 0 === m ? t.ComponentColor.Primary : m, g = ae(h, l), y = H("cf-panel", ((r = {})["" + f] = f,
                r["cf-panel__gradient"] = l,
                r["cf-panel__" + g + "-text"] = g,
                r)), b = d && s.createElement(he, {
                    onClick: d,
                    color: v
                }), w = function(e, t, n) {
                    var r = {
                        backgroundColor: e
                    };
                    return n ? K({}, r, n) : r
                }(h, 0, i);
                return s.createElement("div", {
                    id: o,
                    ref: n,
                    style: w,
                    "data-testid": u,
                    className: y
                }, b, c)
            })

In the above code, variable l which is the gradient, is not getting used outside of the style. Instead 0 is getting passed in to the function and the parameter t (the gradient) is not being used at all in the function w.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants