0.1.2 • Published 4 years ago

recursive-buttons v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

recursive-buttons

recursive-buttons is a simple decorative react component that you can import as a library. It's inspired by a geometric shape called Sierpinski carpet and bubble wrap popping.

example of a component

Install

npm install recursive-buttons --save

Example usage

import React from 'react';
import { RecursiveButtons } from 'recursive-buttons';

// you have to wrap recursiveButtons with a parent with its own height
const componentWithRecursiveButtons = () => (
  <div style={{ width: '200px', height: '200px' }}>
    <RecursiveButtons text="hover over me" hover />
  </div>
);

Storybook

https://recursive-buttons-docs.mcalus.dev

API

import

import { RecursiveButtons } from 'recursive-buttons';

Props

NameTypeDefaultDescription
touchEnabledbooleantrueenables touchscreen support
hoverModebooleanfalseenables hover mode (buttons are being clicked when you hover over them)
textstring'click me!'text that is displayed on the initial button. Fill with empty string to not display any text
0.1.2

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.1.1

4 years ago