How to set a fixed css value to a Dynatrace component

Hi,

I am figuring out how to set a fixed with to Formfiled component and TextInput. I tried to wrap these to components into a div but it failed. Could you help to expalin how to adapt a normal css stve to Dynatrace components. Thanks.

Now my code looks like this:

<div style={{ width: ‘100’ }}>                        <FormField  required>                            <TextInput                               …                            />                        </FormField>                    </div>

Hi @JoyLi ,

may I ask which version of the @dynatrace/strato-components-preview package you’re using?

Here is an example that works for me:

<Grid width="350px">
        <FormField label="Enter text" required>
          <TextInput placeholder="This is a default text input" />
        </FormField>
      </Grid>

The width prop can be adapted to your needs, e.g. to “100%” or “100px”. I hope that helps!

Best regards,

Sarah