Here's my styled component file named styles.js
import styled from 'vue-styled-components';
export const StyledTitle = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
export const Wrapper = styled.section`
padding: 4em;
background: papayawhip;
`;
Then in my .vue single file component
<template>
<div class="m-15">
<StyledTitle>SUBMIT YOUR DETAILS</StyledTitle>
</div>
</template>
<script>
import { StyledTitle, Wrapper } from "./styles.js";
export default {
name: "BuyNowCustomerDetails",
props: {
msg: String
}
};
</script>
Not working!
Error
[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.