This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2022-02-18 08:20:47 +00:00
|
|
|
import PropTypes from "prop-types";
|
2022-03-01 15:48:37 +00:00
|
|
|
import styled from "styled-components";
|
2022-02-17 11:53:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Primary UI component for user interaction
|
|
|
|
*/
|
2022-03-01 15:48:37 +00:00
|
|
|
export const Button = styled.button.attrs(({ $primary }) => ({
|
|
|
|
type: "button",
|
2022-03-15 17:59:09 +00:00
|
|
|
className: `px-6 py-2.5 rounded-full font-sans uppercase text-xs tracking-wide text-palette-600 transition-[filter] hover:brightness-90
|
2022-03-01 15:48:37 +00:00
|
|
|
${$primary ? "bg-primary" : "bg-white border-2 border-black"}`,
|
|
|
|
}))``;
|
2022-02-17 11:53:32 +00:00
|
|
|
Button.propTypes = {
|
|
|
|
/**
|
|
|
|
* Is this the principal call to action on the page?
|
|
|
|
*/
|
2022-03-01 15:48:37 +00:00
|
|
|
$primary: PropTypes.bool,
|
2022-02-18 08:20:47 +00:00
|
|
|
};
|
2022-02-17 11:53:32 +00:00
|
|
|
|
|
|
|
Button.defaultProps = {
|
2022-03-01 15:48:37 +00:00
|
|
|
$primary: false,
|
2022-02-18 08:20:47 +00:00
|
|
|
};
|