npm.io
9.0.0-beta.4 • Published 4 years ago

@fluentui/react-conformance-make-styles

Licence
MIT
Version
9.0.0-beta.4
Deps
2
Size
42 kB
Vulns
0
Weekly
0
Stars
20.1K
DeprecatedThis package is deprecated

@fluentui/react-conformance-make-styles

A set of conformance tests for @fluentui/react-make-styles. Intended to be used with @fluentui/react-conformance.

Usage

import { isConformant } from '@fluentui/react-conformance';
import makeStylesTests from '@fluentui/react-conformance-make-styles';

isConformant({
  Component,
  extraTests: makeStylesTests,
});

Please make sure this package is being used with @fluentui/react-conformance if you do use this package without the conformance test runner, you will have problems with missing types. To resolve, just install @fluentui/react-conformance as a dev dependency or a depdency.

Tests

classname-wins

A conformance test for mergeClasses() that ensures that a classname from props is passed as a last param.

// ✅ good
mergeClasses(classes.root, 'foo', props.className);
// ❌ bad
mergeClasses(classes.root, props.className, 'foo');