I'm trying to style a list of items in React, with a specific styling for the last item of this list.
Here is what I have for the moment
const SuggestionStyles: CSSProperties = {
borderBottom: '1px solid #ccc',
};
// ...
{suggestions.map((suggestion: GeocodingSuggestion) => {
return(
<p style={SuggestionStyles} key={suggestion.name}>{suggestion.name}</p>
);
})}
So not using any particular library to handle the styling right now. And I can't manage to find how to target the last child within SuggestionStyles