feat: create randomId helper and use everywhere

Co-authored-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
Dominik Pschenitschni 2021-10-04 14:20:29 +02:00
parent 3750b0f78b
commit 35c861b711
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
4 changed files with 13 additions and 7 deletions

View file

@ -28,6 +28,8 @@
</template>
<script>
import {createRandomID} from '@/helpers/randomId'
const DEFAULT_COLORS = [
'#1973ff',
'#7F23FF',
@ -37,11 +39,6 @@ const DEFAULT_COLORS = [
'#00db60',
]
function createRandomID() {
const ID_LENGTH = 9
return Math.random().toString(36).substr(2, ID_LENGTH)
}
export default {
name: 'colorPicker',
data() {