Contains the Atoms, Molecules, Layout & other core components that make up the Cobalt UI library.
npm install @yext/cobalt-coreThis repo contains the immutable Cobalt components, namely the Atoms & Molecules.
Versioning the commits correctly is extremely important. DO NOT modify the package.json or tags manually. Use yarn version -m [COMMIT MESSAGE] and specify the next logical version number. This will commit all changes & update both package.json AND the git tag.
Use SEMVAR (semantic versioning)! There will be actual things using this repo as a dependency so SEMVAR matters!
For non-breaking changes (this means any repo can be upgraded without issues), increment the 3rd position. Ex. 0.0.1 -> 0.0.2
For breaking changes, increment the 2nd position. Ex. 0.1.0 -> 0.2.0
You should never need to increment the first position unless you are completely overhauling the cobalt system.
In your soy, simply call the components by their namespace and template name.
```
{call cobalt.molecules.Truncate data="all"}
// Params here
{/call}
In your scss, you can import the sass modules at the directory level or by the indivdiual components.
Some examples:
- Import all @import '~@yext/cobalt-core'
- Import all molecules @import '~@yext/cobalt-core/molecules'
- Import a single molecule @import '~@yext/cobalt-core/molecules/Truncate'
`javascript``
import { Truncate } from "@yext/cobalt-core/molecules";
Truncate.init();