compiled
compiled copied to clipboard
Expose ax function in class names props
Currently if you want to access ax you need to import it directly:
import { ax } from '@compiled/react/runtime';
We don't want to encourage developers accessing the runtime module if we can avoid it. Instead ax should be supplied through the ClassNames props:
<ClassNames>{({ ax }) => <div className={ax([])} />}</ClassNames>
This handles the use case where developers using ClassNames want to also take styles as props and compose them together.