NavigationStyles.js
import styled from 'styled-components';
export const Navigation = styled.navwidth: 100%;
;
export const MobileNavMenu = styled.ul`
height: 80px;
.navbar_list_class {
font-size: 2rem;
background-color: red;
}
${props => props.navbar_list_props && `
font-size: 2rem;
background-color: gray;
`}
`;
Navigation.js import React from 'react' import {Navigation, MobileNavMenu} from "./NavigationStyles";
const NavigationComponent = () => {
return (
<Navigation>
{/* work no problem */}
<MobileNavMenu navbar_list_props>Navigation Bar props</MobileNavMenu>
{/* not work How to use..? */}
<MobileNavMenu className="navbar_list_class">Navigation Bar class</MobileNavMenu>
</Navigation>
)
}
export default NavigationComponent