Skip to content

scoped styled-jsx not working with antd components. #2296

@supra28

Description

@supra28

Take for example a Form:

<div>
<Form onSubmit={this.handleSubmit} className="login-form">

          <FormItem>
            {getFieldDecorator("userName", {
              rules: [
                { required: true, message: "Please input your username!" }
              ]
            })(
              <Input
                prefix={<Icon type="user" style={{ fontSize: 13 }} />}
                placeholder="Username"
              />
            )}
          </FormItem>
</Form>
 <style jsx>{`
          .login-form {
            max-width: 300px;
            margin: 0 auto;
          }
        `}</style>
</div>

The style doesn't apply to the Form unless we change <style jsx> to <style>
It doesn't generate data-jsx Id for the form component.
is this behavior expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions