summaryrefslogtreecommitdiff
path: root/examples/ssr/src/components/TextDecorationSkip.astro
blob: b35179ea84e5fe558c3209342ebeb77f7495963b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
const { text } = Astro.props;
const words = text.split(' ');
const last = words.length - 1;
---
<style>
 span {
	text-decoration: underline;
 }
</style>
{words.map((word, i) => (
	<Fragment>
		<span>{word}</span>{i !== last && (<Fragment>&#32;</Fragment>)}
	</Fragment>
))}