ExCSSModules v0.0.5 ExCSSModules View Source
CSS Modules helpers
Link to this section Summary
Functions
Reads the class definitions from the definition map and maps them to a class attribute. The classes argument takes any argument the class_name for the key
If value is truthy, read the class definitions and maps them to a class attribute.
When value is falsy return nil
Returns the class name sfrom the definition map when the argument is a list of values or tuples
Returns the class name from the definition map if value is true
Link to this section Functions
Reads the class definitions from the definition map and maps them to a class attribute. The classes argument takes any argument the class_name for the key.
Examples
iex> class(%{ “hello” => “world”}, “hello”)
If value is truthy, read the class definitions and maps them to a class attribute.
When value is falsy return nil.
Examples
iex> class(%{ “hello” => “world”}, “hello”, true)
iex> class(%{ “hello” => “world”}, “hello”, false) nil
Returns the class name sfrom the definition map when the argument is a list of values or tuples.
Examples
iex> class_name(%{“hello” => “world”}, “hello”) “world”
iex> class_name(%{“hello” => “world”}, “foo”) nil
Returns the class name from the definition map if value is true.
Examples
iex> class_name(%{“hello” => “world”}, “hello”, true) “world”
iex> class_name(%{“hello” => “world”}, “hello”, false) nil