how to pass props in gatsby link using styledcomponent
<Link to="/" activeClassName="link__active" />
<style>
.link__active {
color: #b100c2;
}
</style>import { Link } from 'gatsby';
const StyledLink = styled(props => <Link {...props} />)`
color: aqua;
`;
// ...
<StyledLink to="/">
Gatsby
</StyledLink>
Also in JavaScript:
- How to add js file to a site through url
- react router catch all 404
- slick js
- calculate distance between two coordinates formula javascript
- how to get the square root in js
- axios set authorization header
- change a variable outside a function js
- javascript moeda reais
- cascading dropdown for forms react
- ajax request qml
- 6 ways to modify an array javascript
- react native flatlist margin bottom
- data submit notification in javascript
- recursion in javascript
- if condition to whether json object has jsonarray or jsonobject
- jquery open image in new tab
- how to find all permutations of an array with javascript
- useRef() in react
- React get method
- chart.js
- get file extension of path extendscript
- javascript var
- how to create component in reactjs
- how to restablished closed rxjs websocket