mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Export button props, improve styling of swatches
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
.root {
|
||||
@apply cursor-pointer inline-flex px-10 rounded-sm border border-transparent leading-6 text-white bg-black transition ease-in-out duration-150 shadow-sm font-semibold text-center justify-center uppercase py-4 uppercase text-center;
|
||||
@apply cursor-pointer inline-flex px-10 rounded-sm leading-6 text-white bg-black transition ease-in-out duration-150 shadow-sm font-semibold text-center justify-center uppercase py-4 uppercase text-center focus:outline-none;
|
||||
}
|
||||
|
||||
.root:hover {
|
||||
@apply bg-white text-black border-black;
|
||||
@apply bg-gray-800;
|
||||
}
|
||||
|
||||
.root:focus {
|
||||
@apply border-gray-700 shadow-outline;
|
||||
@apply shadow-outline;
|
||||
}
|
||||
|
||||
.root[data-active] {
|
||||
@apply bg-gray-200;
|
||||
@apply bg-gray-600;
|
||||
}
|
||||
|
||||
s.filled {
|
||||
|
@@ -9,7 +9,7 @@ import mergeRefs from 'react-merge-refs'
|
||||
import { useButton } from 'react-aria'
|
||||
import s from './Button.module.css'
|
||||
|
||||
interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
href?: string
|
||||
className?: string
|
||||
variant?: 'filled' | 'outlined' | 'flat' | 'none'
|
||||
@@ -18,7 +18,7 @@ interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
Component?: string | JSXElementConstructor<any>
|
||||
}
|
||||
|
||||
const Button: React.FC<Props> = forwardRef((props, buttonRef) => {
|
||||
const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
||||
const {
|
||||
className,
|
||||
variant = 'filled',
|
||||
|
@@ -1 +1,2 @@
|
||||
export { default } from './Button'
|
||||
export * from './Button'
|
||||
|
Reference in New Issue
Block a user