Collapse button component for Mathsy applications
npm install mathsy-collapse-buttonbash
npm install mathsy-collapse-button
or
yarn add mathsy-collapse-button
`
Usage
`typescript
import CollapseButton from 'mathsy-collapse-button';
function MyComponent() {
const [isCollapsed, setIsCollapsed] = useState(false);
return (
collapsed={isCollapsed}
onClick={() => setIsCollapsed(!isCollapsed)}
/>
);
}
`
Props
- collapsed?: boolean - Controls the button's collapsed state
- All other props from Material-UI's IconButton component are supported
Development
1. Clone the repository
2. Install dependencies: yarn install
3. Build the package: yarn build`