ButtonGroup

img

A basic ButtonGroup component that should render nicely on any platform. Supports a good level of customization.

You can customization Button group component with the Props

Usage#

import React, {FC, useState} from 'react';
import {Body,ButtonGroup} from 'qdmrncomponents';
const App: FC = () => {
const Button1Onpress = () =>{
console.log('1st button pressed');
}
const Button2Onpress = () =>{
console.log('2st button pressed');
}
const ButtonPress = (index) =>{
switch(index){
case 0:
Button1Onpress();
break;
case 1:
Button2Onpress();
break;
default :
Button1Onpress()
}
}
return (
<Body paddingAll={20} V_Aligin_center>
<ButtonGroup
buttons={['Hello','World']}
/>
</Body>
);
};

Reference#

Props#

here all the list of Props you can use for ButtonGroup Component and it Inherits all ButtonGroup Props

buttons#

props for button list to render Array of object

onPress#

props for onpress function for each button Function

import React, {FC, useState} from 'react';
import {Body,ButtonGroup} from 'qdmrncomponents';
const App: FC = () => {
const Button1Onpress = () =>{
console.log('1st button pressed');
}
const Button2Onpress = () =>{
console.log('2st button pressed');
}
const ButtonPress = (index) =>{
switch(index){
case 0:
Button1Onpress();
break;
case 1:
Button2Onpress();
break;
default :
Button1Onpress()
}
}
return (
<Body paddingAll={20} V_Aligin_center>
<ButtonGroup
buttons={['Hello','World']}
onPress={ButtonPress}
/>
</Body>
);
};

borderColor#

props give color to the button border string

bgColor#

props give background color to the button string

buttonFontSize#

props give font size to the button text number

buttonFontColor#

props give font color to the button text string

buttonFontWeight#

props give font weight to the button text string--'bold'

inlineStyle#

props give addition props to the Button element type Object