I have components that look identical with the same data, but sometimes I want it to be a link and sometimes a div, etc. Can I have it be one component (because they have identical styles) and do something like pass in a prop to change the type of component?
For example:
import styled, { css } from "styled-components";
import { Link } from "react-router-dom";
export const Container = styled.div` *<<--- how do I make this styled.div OR styled(Link)*
some styles here
`;