Gbuomprisco / ngx-content-loading

Angular component to create SVG loading placeholders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

width is not working

ShivPandey opened this issue · comments

we will not able to define with and there is also a suggestion to give default 100% to inherit from parent

I was able to make width inherit from parent by making the svg width the same width as the ngx-loading-content width. The actual number doesn't matter, but they must be the same number (300 in my case)

  <ngx-content-loading
  [speed]="'1500ms'"
  [width]="300"
  [height]="300"
  [primaryColor]="'#eee'"
  [secondaryColor]="'#fff'">
	<svg:g ngx-rect width="300" height="10" y="10" x="0" rx="5" ry="5"></svg:g>
	<svg:g ngx-rect width="300" height="10" y="40" x="0" rx="5" ry="5"></svg:g>
	<svg:g ngx-rect width="300" height="10" y="70" x="0" rx="5" ry="5"></svg:g>
</ngx-content-loading>