Skip to main content

Function: defaultCssClasses()

defaultCssClasses(classRules, component?): string

Defined in: packages/react-page-renderer/src/componentHelpers.ts:122

Generate a string of CSS classes from the properties of the passed-in object that resolve to true.

Parameters​

classRules​

Argument

CSS classes in a string separated by whitespace, or a map of CSS class names to boolean values. The CSS class name will be included in the result only if the value is true.

component?​

The component requiring the composition of the CSS class names, if it has the className property set and requires its inclusion this time.

string | ComponentType

Returns​

string

String of CSS classes that had their property resolved to true.