Skip to content

Commit

Permalink
feat: [divider] - remove id prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgoud committed Oct 23, 2023
1 parent 10c2f3a commit 90198bf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
8 changes: 1 addition & 7 deletions packages/components/divider/src/divider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ import { buildProps } from '@puik/utils'
import type { ExtractPropTypes } from 'vue'
import type Divider from './divider.vue'

export const dividerProps = buildProps({
id: {
type: String,
required: false,
default: undefined,
},
} as const)
export const dividerProps = buildProps({} as const)

export type DividerProps = ExtractPropTypes<typeof dividerProps>

Expand Down
4 changes: 1 addition & 3 deletions packages/components/divider/src/divider.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<template>
<hr :id="id" class="puik-divider" />
<hr class="puik-divider" />
</template>

<script setup lang="ts">
import { dividerProps } from './divider'

Check warning on line 6 in packages/components/divider/src/divider.vue

View workflow job for this annotation

GitHub Actions / puik-ci (ubuntu-latest, 18)

'dividerProps' is defined but never used
defineOptions({
name: 'PuikDivider',
})
const props = defineProps(dividerProps)
</script>
5 changes: 0 additions & 5 deletions packages/components/divider/test/divider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ describe('Divider tests', () => {
factory()
expect(wrapper).toBeTruthy()
})

it('as id prop value is "puik-chip-example", id html attribute of puik-chip should be "puik-chip-example"', () => {
factory({ id: 'puik-divider-id' })
expect(findDivider().attributes().id).toBe('puik-divider-id')
})
})

0 comments on commit 90198bf

Please sign in to comment.