简体   繁体   中英

This expression was expected to have type 'Label.Option' but here has type 'HTMLAttr'

i am trying add styling to a label in a form as shown in picture but i am getting error as shown above

When using Fulma, you have access to 3 specials helpers on each Fulma component:

  • CustomClass allows you to pass a custom class
  • Props allows you to pass any standard html property (aka HTMLAttr )
  • Modifiers allows you to add Modifiers coming from Fulma (like Modifier.IsHidden for example).

You should probably read this page to know more about Fulma in general

In your case, you want to write something like that:

Label.label [ Label.Props [ Style [ BackgroundColor "yellow" ] ]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM