import * as React from "react"; import { cx } from "emotion"; import { iconStyle, getButtonStyle, dropDownButtonStyle, dropDownButtonDefaultStyle } from "./styles/Button.styles"; import Ink from "react-ink"; import { ButtonProps, DropDownButtonProps } from "./typings/Button"; import Loader from "./Loader"; import { colors } from "pebble-shared"; const Button: React.FunctionComponent = ({ type = "primary", disabled, children, onClick, width, showShadow, className, showRipple = true, loading, outline, size = "small", buttonProps }: ButtonProps) => { const disableAction = disabled || loading; const _outline = size === "x-small" || !!outline; const _className = cx( getButtonStyle(size, type, !!showShadow, !_outline), className ); return ( ); }; export const DropDownButton = ({ isOpen, isSelected, children, className, ...props }: DropDownButtonProps) => { const _className = cx(dropDownButtonStyle, { [dropDownButtonDefaultStyle]: !(isOpen || isSelected) }); return ( ); }; export default Button;