Skip to content

Commit

Permalink
docs: Add migration guide to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
rkunev committed Apr 20, 2020
1 parent 425fea3 commit b94e357
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ The right color picker, but not the framework you're looking for?
* [Usage](#usage)
* [Options](#options)
* [Change log](#change-log)
* [Migration from v2](#migration-from-v2)
* [Migration from v1](#migration-from-v1)
* [Contributing](#contributing)
* [Credits](#credits)
Expand Down Expand Up @@ -144,6 +145,27 @@ Please see [Releases][link-releases] for more information on what has changed re

[Back To Top](#quick-links)

## Migration from v2

With v3 the inner circle is now transparent instead of solid white. If you previously relied on that and you prefer to keep the existing behavior you can do that by wrapping the `<color-picker>` with a `<div>` and add white background to it. Here's an example how to do that:

```vue
<template>
<div class="wrapper">
<color-picker :hue="hue" @input="onInput"></color-picker>
</div>
</template>
<style>
.wrapper {
padding: 32px;
background: #fff;
}
</style>
```

[Back To Top](#quick-links)

## Migration from v1

Straight forward - `v-model` becomes `v-bind` and you need to add the `@input` event (which was previously added by the `v-model` directive implicitly).
Expand Down

0 comments on commit b94e357

Please sign in to comment.