erikdstock/roses

built-in theme provider doesn't seem to work as expected

Closed this issue · 1 comments

not clear why but the context theme was undefined when pulling from this component:

const RawInput = styled("input")<InputElementProps>(
  styledCss({
    border: "none",
    width: "100%",
    bg: "background",
    fontSize: "0.85rem",
    lineHeight: "1.8",
    fontFamily: "sans",
    pb: 1,
    ":focus": {
      outline: "none",
    },
    "::placeholder": {
      color: disabledColor,
    },
  }),
  ({ theme, underline = false, error, disabled }) => {
    // debugger
    if (underline) {
      const underlineColor = error
        ? theme.colors.red
        : disabled
        ? theme.colors[disabledColor]
        : theme.colors["gray.3"]
      return styledCss({
        borderBottom: "solid 1px",
        borderColor: underlineColor,
      })
    }
  }
)

this needs verification but may be due to me working with some crapped up node_modules. a rm -rf fixed lots of the issues i was having with them that day.