vue-styled-components icon indicating copy to clipboard operation
vue-styled-components copied to clipboard

router-link -> Uncaught Error: undefined is not allowed for styled tag type.

Open jarayabozo opened this issue 4 years ago • 0 comments
trafficstars

I'm trying to style the vue slide up down component and am having issues doing so. My code is as follows.

import Vue from 'vue';
import styled from 'vue-styled-components';

const RouterLink = Vue.component('router-link');

const NavbarLink = styled(RouterLink)`
  color: palevioletred;
  font-size: 1em;
  text-decoration: none;
`;

export default NavbarLink;

Error:

vue-styled-components.es.js?9c56:3112 Uncaught Error: undefined is not allowed for styled tag type.
    at styled (vue-styled-components.es.js?9c56:3112)
    at eval (navbar-link.style.js?5592:6)
    at Module../src/components/elements/navbar-link.style.js (app.js:1196)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js&:3)
    at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js& (app.js:1007)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (App.vue?c53a:1)

Thanks!

jarayabozo avatar Mar 23 '21 14:03 jarayabozo