2.0.3 • Published 9 months ago

@frankhoodbs/slot-helper v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Slot helper

This is a helper used to check if a slot is available or is not empty.

Version License

Usage

import { isSlotAvailable, isSlotNotEmpty } from '../src';

// Slots
const slots = defineSlots<{
  'default'?: (props: {}) => any;
  'content'?: (props: {}) => any;
}>();
const hasSlot = (name: 'default' | 'content'): boolean => isSlotAvailable(slots, name);
const hasSlotNotEmpty = (name: 'default' | 'content'): boolean => isSlotNotEmpty(slots, name);

// on the template v-if="hasSlot('default')"
2.0.3

9 months ago

2.0.2

10 months ago

2.0.1

10 months ago

1.2.12

10 months ago

1.2.11

10 months ago

1.2.9

1 year ago

1.2.10

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.1

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.4

2 years ago

1.0.0

2 years ago