Button

Button is a base component of Kenobi. It can contain a label and an icon before or after the label.

Usage

Variations

Component and Row are not a part of Kenobi

More information on usage of Icons

Sizing

Default size for buttons are 32px. Button will handle its own scaling based on the height.

Due to using Styled-components as our CSS-in-JS library it is really simple to switch out the underlying HTML element. We just have to pass the prop isLink to the Button component. The button will pass the as prop to the Styled element.

This will render the button as an anchor element.

Extending styles

It's very easy to extend Button styles with styled-components. (Haven't tested any other solutions).

import styled from 'styled-components';
import { Button } from 'kenobi-ui';
const PurpleButton = styled(Button)`
background-color: #551a8b;
`;
<PurpleButton>I am now Purple!</PurpleButton>;