Features like breakpoints can be configured today when calling createApp():
import { createApp, Base } from '@studiometa/js-toolkit';
class App extends Base {
static config = {
name: 'App',
}
}
createApp(App, {
breakpoints: {
s: '40rem',
m: '80rem',
l: '100rem',
},
});
With the introduction of the registry in v3.4.0 and of the registerComponent() helper, the createApp() function is no longer the only way to mount components.
We should either have:
- one helper function for each feature:
defineBreakpoints(), defineAttributes(), etc.
- a single
defineFeatures() helper function
- or a
Feature component whose options could be mapped to the features map