VRadio.mjs 984 B

1234567891011121314151617181920212223242526272829
  1. import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
  2. // Components
  3. import { makeVSelectionControlProps, VSelectionControl } from "../VSelectionControl/VSelectionControl.mjs"; // Utilities
  4. import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
  5. export const makeVRadioProps = propsFactory({
  6. ...makeVSelectionControlProps({
  7. falseIcon: '$radioOff',
  8. trueIcon: '$radioOn'
  9. })
  10. }, 'VRadio');
  11. export const VRadio = genericComponent()({
  12. name: 'VRadio',
  13. props: makeVRadioProps(),
  14. setup(props, _ref) {
  15. let {
  16. slots
  17. } = _ref;
  18. useRender(() => {
  19. const controlProps = VSelectionControl.filterProps(props);
  20. return _createVNode(VSelectionControl, _mergeProps(controlProps, {
  21. "class": ['v-radio', props.class],
  22. "style": props.style,
  23. "type": "radio"
  24. }), slots);
  25. });
  26. return {};
  27. }
  28. });
  29. //# sourceMappingURL=VRadio.mjs.map