Adding styles to the component
Finally, you can add the following <style>
block to the Birthday.svelte
file, which completes the Birthday
component and means you’ll be ready to display it on a page, which you’ll do in the next chapter:
<script> export let name; export let dob; </script> <span><strong>{name}</strong></span> <span>{dob}</span> <style> span { display: inline-block; width: 100px; } </style>
You can avoid writing unit tests for CSS since that is static information. Unit tests are specifically about behavior: what happens when this thing or that thing changes, or a different name
prop is passed in?