Logo Xantham

AttributesBuilder Module

Functions and values

Function or value Description

attributes

Full Usage: attributes

Returns: AttributesBuilder

General purpose helper for collecting attributes without nonsense. Premade operations for compiledName which only print the attribute if the name passed is modified. Will automatically handle options/value options of attributes.

Returns: AttributesBuilder
Example

Instead of writing:

 let attributes = [
     if Name.Case.isModified value.Name then
         Name.valueOrSource value.Name
         |> Attributes.compiledName
     if attributeMaybe.IsSome then attributeMaybe.Value
 ]
val attributes: obj list
You can write:
 let attributes = attributes {
     compiledName value.Name
     attributeMaybe
 }
val attributes: obj

attributesInjector

Full Usage: attributesInjector

Returns: AttributesModifierBuilder<^Modifier, ^Widget>
Modifiers: inline
Type parameters: ^Modifier, ^Widget (requires (static member attributes : ^Widget * Fabulous.AST.WidgetBuilder<Fantomas.Core.SyntaxOak.AttributeNode> Microsoft.FSharp.Collections.list -> ^Widget))
Returns: AttributesModifierBuilder<^Modifier, ^Widget>

Type something to start searching.