🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
665 B

import { defineComponent } from 'vue';
import Radio, { radioProps } from './Radio';
import useConfigInject from '../config-provider/hooks/useConfigInject';
import { useProvideRadioOptionTypeContext } from './context';
export default defineComponent({
compatConfig: { MODE: 3 },
name: 'ARadioButton',
inheritAttrs: false,
props: radioProps(),
setup(props, { slots, attrs }) {
const { prefixCls } = useConfigInject('radio', props);
useProvideRadioOptionTypeContext('button');
return () => {
return (
<Radio {...attrs} {...props} prefixCls={prefixCls.value}>
{slots.default?.()}
</Radio>
);
};
},
});