system-ui / theme-ui

Build consistent, themeable React apps based on constraint-based design principles
https://theme-ui.com
MIT License
5.3k stars 672 forks source link

Unable to use sx prop on Input component #2426

Closed rilrom closed 9 months ago

rilrom commented 1 year ago

Description

When using the Input component, sx does not apply.

This does not happen for any of the other components I've tried (e.g. Box, Label etc).

The only difference I can see between these components is that sx is being called explicitly in the Input code.

To reproduce:

  1. Set up a theme provider.
  2. Apply some basic styles in forms.input.
  3. Attempt to override them using an sx prop.
  4. Styles do not appear in the browser styles console log.

Expected behaviour

sx prop for Input works the same as other components.

Caryyon commented 9 months ago

@rilrom could you provide some example code, with a quick glance at the Input component it is a simple passthrough. We need a bit more context of your specific usage.

rilrom commented 9 months ago

@Caryyon apologies for not setting up a reproducible example when this ticket was created.

I am unable to reproduce at this time so i'm okay with closing this ticket, thanks.