1.0.0 • Published 7 years ago
@atheon/flex-center v1.0.0
flex-center
The flex-center
component (provided as myth-flex-center
) centers itself in its parent container, and then centers its content within itself.
Want to center something right now? Use this!
Usage
- Run
ng add @atheon/flex-center
. - Add the
<myth-flex-center>
element to a template. - Put stuff in it, whatever you want. Even interpolated content!*
- The stuff is now centered in the thing you put
<myth-flex-center>
* Interpolated content containing HTML will have the HTML escaped. To supply a string containing HTML, bind to the contentOverride
property.
Example (Typical)
<your-great-component>
<div>
<myth-flex-center>Put anything here, doesn't matter! It's magic</myth-flex-center>
</div>
</your-great-component>
Example (Content Override)
<your-great-component>
<div>
<myth-flex-center [contentOverride]="myPropertyContainingContent"></myth-flex-center>
</div>
</your-great-component>
1.0.0
7 years ago