ButtonSelectorWidget

Live example

Source

import 'normalize.css';

import React from 'react';
import ReactDOM from 'react-dom';

import ButtonSelectorWidget from 'paraviewweb/src/React/Widgets/ButtonSelectorWidget';

const container = document.querySelector('.content');

function process(idx, list) {
console.log(idx, list);
}

ReactDOM.render(
React.createElement(ButtonSelectorWidget, {
list: [{ name: 'Choice A' }, { name: 'Choice B' }, { name: 'Choice C' }],
onChange: process,
}),
container
);

container.style.margin = 0;