I have a vue component
<Student></Student>
I want to change the style based on if they are an undergrad or postgrad.
I know I can pass in a prop and use this value to assign a dynamic class or use it in a computed prop.
<Student type="'postGrad'"></Student>
But can I do this with slots and assign a class or is there a better way to use props to achieve this?
<Student>
<slot name="type">PostGrad/slot>
</Student>
I have always used props but feel I could be missing a good technique with slots.