solidjs / solid-styled-components

A 1kb Styled Components library for Solid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

styled svg renders viewbox attribute instead of viewBox

btakita opened this issue · comments

const Svg = styled('svg')<{ spin?:any, pulse?:any }>($p=>{
	return `
		${$p.spin ? `
			animation: ${spin} 2s 0s infinite linear;
		` : ''}
		${$p.pulse ? `
			animation: ${spin} 1s infinite steps(8);
		` : ''}
	`
})
<Svg viewBox="0 0 10 10"></Svg> # renders as <svg viewbox="0 0 10 10"></svg>

Hmm. Right, it isn't aware of SVG elements. Yeah in general I don't think this library supports SVG yet. I wonder if changing the implementation to use <Dynamic> will just handle this properly.

I believe #30 should add support for this. Released in 0.28.2.