How to use the reakit.useToolbarState function in reakit

To help you get started, we’ve selected a few reakit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pubpub / pubpub / client / components / FormattingBarNew / controls / ControlsTable.js View on Github external
const ControlsTable = (props) => {
	const { editorChangeObject } = props;
	const { menuItems = [], view } = editorChangeObject;
	const toolbar = useToolbarState({ loop: true });

	// eslint-disable-next-line react/prop-types
	const renderDisclosure = ({ ref, ...disclosureProps }) => {
		return (
			<button>
		);
	};

	return (</button>
github pubpub / pubpub / client / components / FormattingBarNew / FormattingBar.js View on Github external
const FormattingBar = (props) => {
	const {
		buttons,
		editorChangeObject,
		popoverContainerRef,
		showBlockTypes,
		isSmall,
		isTranslucent,
		isFullScreenWidth,
	} = props;
	const { menuItems, insertFunctions, view } = editorChangeObject;
	const { communityData } = usePageContext();
	const toolbar = useToolbarState({ loop: true });
	const {
		indicatedButtons,
		openedButton,
		setOpenedButton,
		controlsKey,
		controlsPosition,
		ControlsComponent,
	} = useControlsState(props);

	const menuItemByKey = (key) => {
		if (menuItems) {
			return menuItems.find((menuItem) => menuItem.title === key);
		}
		return null;
	};
github reakit / reakit / examples / kanban / components / Column.tsx View on Github external
function Column({
  columnId,
  title,
  onSubmit,
  onRemove,
  ...props
}: ColumnProps) {
  const rover = useRoverState({ orientation: "vertical" });
  const toolbar = useToolbarState();
  const { columns, addCard, removeCard, editCard } = useBoardContext();

  const { cards = [] } = columns.find(column =&gt; column.id === columnId) || {};

  return (
    
      {roverProps =&gt; (