Skip to content

Commit

Permalink
fix(plugins): update vue example and documentation formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tobua committed Jul 20, 2021
1 parent 88160b0 commit 4a9aece
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,30 @@ indicate(document.getElementById('my-element'), {
In the React version you can use all regular options plus a few specific ones.

```tsx
<Indicate
// Specify what kind of tag the element should be, default 'div'.
as="div"
// Use any regular option.
color="#00FF00"
inlineStyles={{
element: { background: 'black' }
}}
>
{`...`}
</Indicate>
const Regular = (
<Indicate
// Specify what kind of tag the element should be, default 'div'.
as="div"
// Use any regular option.
color="#00FF00"
inlineStyles={{
element: { background: 'black' },
}}
>
{`...`}
</Indicate>
)

// If you already have an element with overflow, just wrap that element with <Indicate>
// and the first child will be used as the element. Make sure to pass a ref.
const elementRef = useRef()
<Indicate childAsElement ref={elementRef} style={{display: 'inline-flex'}}>
<div ref={elementRef}>
<p>Whatever</p>
</div>
</Indicate>
const Existing = (
<Indicate childAsElement ref={elementRef} style={{ display: 'inline-flex' }}>
<div ref={elementRef}>
<p>Whatever</p>
</div>
</Indicate>
)
```

The `childAsElement` option is useful if you're adding `Indicate` to existing markup that
Expand Down
12 changes: 6 additions & 6 deletions plugins/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"start": "synec --no-watch && vue-cli-service serve"
},
"dependencies": {
"core-js": "^3.12.1",
"vue": "^2.6.12"
"core-js": "^3.15.2",
"vue": "^2.6.14"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.13",
"@vue/cli-plugin-eslint": "~4.5.13",
"@vue/cli-service": "~4.5.13",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-vue": "^7.9.0",
"synec": "^0.1.16",
"vue-template-compiler": "^2.6.12"
"eslint": "^7.31.0",
"eslint-plugin-vue": "^7.14.0",
"synec": "^0.2.0",
"vue-template-compiler": "^2.6.14"
},
"localDependencies": {
"indicate": "../.."
Expand Down

0 comments on commit 4a9aece

Please sign in to comment.