Remove lodash.uniqueId

This commit is contained in:
venashial
2022-04-03 11:45:04 -07:00
parent 44c8574f1b
commit 3646c0d0a3
8 changed files with 11 additions and 11 deletions

View File

@@ -14,7 +14,7 @@
export let value = ''
export let size: 'sm' | 'md' | 'lg' = 'md'
export let color: 'raised' | 'primary' | 'primary-light' | 'danger'| 'danger-light' | 'transparent'
export let color: '' | 'raised' | 'primary' | 'primary-light' | 'danger'| 'danger-light' | 'transparent' = ''
/** Show notification badge in the upper right of button */
export let badge = false

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import uniqueId from 'lodash.uniqueid'
import { uniqueId } from '../utils/uniqueId'
import IconCheck from 'virtual:icons/heroicons-outline/check'
export let checked = false;

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import uniqueId from 'lodash.uniqueid'
import { uniqueId } from '../utils/uniqueId'
export let required = false;
export let label: string;

View File

@@ -0,0 +1,6 @@
let idCounter = 0;
export function uniqueId(prefix = ''): string {
const id = ++idCounter;
return prefix + id;
}

View File

@@ -39,6 +39,7 @@
position: relative;
justify-content: flex-start;
z-index: 1;
padding: 16px;
}
&__source {

View File

@@ -2,7 +2,7 @@
<script lang="ts">
import { CheckboxVirtualList } from "omorphia";
import IconStar from 'virtual:icons/heroicons-outline/star'
import uniqueId from 'lodash.uniqueid'
import { uniqueId } from 'omorphia/utils/uniqueId'
let options = Array(100).fill({})
.map(option => ({