try to scope react styles

This commit is contained in:
Philipp Kühn
2021-03-18 10:43:34 +01:00
parent 947318f18e
commit 56d00053db
3 changed files with 40 additions and 39 deletions

View File

@@ -10,7 +10,6 @@
border-radius: 0.5rem;
margin: 1rem 0;
position: relative;
}
.label {
margin-left: 1rem;
@@ -30,3 +29,4 @@
margin-top: 1.5rem;
padding: 1rem;
}
}

View File

@@ -3,7 +3,7 @@ import { NodeViewWrapper, NodeViewContent } from '@tiptap/react'
export default () => {
return (
<NodeViewWrapper className="react-component">
<NodeViewWrapper className="react-component-with-content">
<span className="label">React Component</span>
<NodeViewContent className="content" />

View File

@@ -5,12 +5,11 @@
}
}
.react-component {
.react-component-with-content {
border: 3px solid #0D0D0D;
border-radius: 0.5rem;
margin: 1rem 0;
position: relative;
}
.label {
margin-left: 1rem;
@@ -32,3 +31,5 @@
border: 2px dashed #0D0D0D20;
border-radius: 0.5rem;
}
}