UNPKG

@nodegui/vue-nodegui

Version:

library to render native desktop applications using vue js

47 lines (46 loc) 1.65 kB
import { QRadioButton, NodeWidget } from '@nodegui/nodegui'; import { AbstractButtonProps } from '../AbstractButton/VNAbstractButton'; import { VNWidget } from '../config'; import { PropSetters, Prop } from '../../renderer/patchProp'; /** * The radio button widget allows users to create and render native radio buttons in the app. * It is based on [NodeGui's QRadioButton](https://docs.nodegui.org/docs/api/generated/classes/qradiobutton) * * ## Usage * * ```html * <template> * <vn-view> * <vn-text>What is your favorite colour?</vn-text> * <vn-radio-button>Blue</vn-radio-button> * <vn-radio-button>Green</vn-radio-button> * <vn-radio-button>Yellow</vn-radio-button> * </vn-view> * </template> * * <script> * export default { } * </script> * ``` * * ## What it looks like? * * ![radio-button-demo](/img/vn-radio-button.png) * * ## Props and styling * * You can find all the props `vn-radio-button` accepts listed below. * Apart from this, you can take a look at the [styling](/docs/guides/3-styling) * and [event handling](/docs/guides/5-handle-events) docs */ export interface RadioButtonProps extends AbstractButtonProps { } export declare const RadioButtonPropsSetters: PropSetters<VNRadioButton, RadioButtonProps>; /** @internal */ export declare class VNRadioButton extends QRadioButton implements VNWidget<RadioButtonProps> { insertChild(): void; patchProp(key: keyof RadioButtonProps, prevValue: Prop<RadioButtonProps, typeof key>, nextValue: Prop<RadioButtonProps, typeof key>): void; removeChild(): void; insertBefore(): void; getNextSibling(): NodeWidget<any> | null; }