Skip to content

Commit

Permalink
Merge pull request #89 from hanzoai/ui/button-style
Browse files Browse the repository at this point in the history
UI: updated Button style
  • Loading branch information
zeekay committed Apr 16, 2024
2 parents 32a9a86 + 1bc9b23 commit 1d746db
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
2 changes: 2 additions & 0 deletions packages/ui/blocks/components/screenful-block/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const ScreenfulComponent: React.FC<{
const narrowGutters = specified('narrow-gutters') // eg, for a table object that is large
const noGutters = specified('no-gutters')
const fullScreenWidth = specified('full-screen-width')
const fullScreenHeight = specified('full-screen-height')
const vertCenter = specified('vert-center')

// content wrapper clx:
Expand All @@ -49,6 +50,7 @@ const ScreenfulComponent: React.FC<{
const cwclx = [
'xl:mx-auto overflow-y-hidden ',
fullScreenWidth ? '' : 'max-w-screen-xl',
fullScreenHeight ? 'h-full' : '',
// desktop header: 80px / pt-20
// mobile header: 44px / pt-11
narrowGutters ?
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/primitives/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { cn } from "../util"
const variant = {
primary: "bg-primary text-primary-fg hover:bg-primary-hover font-nav whitespace-nowrap not-typography",
secondary: "bg-secondary text-secondary-fg hover:bg-secondary-hover font-nav whitespace-nowrap not-typography",
outline: "text-foreground bg-background border border-muted-1 hover:bg-level-1 hover:text-accent hover:border-accent font-nav whitespace-nowrap not-typography",
outline: "text-foreground bg-background border border-muted-4 hover:bg-level-1 hover:text-accent hover:border-accent font-nav whitespace-nowrap not-typography",
destructive: "bg-destructive text-destructive-fg font-sans whitespace-nowrap hover:bg-destructive-hover",
ghost: "text-foreground hover:bg-level-1 hover:text-accent whitespace-nowrap font-sans ",
link: "text-foreground hover:text-muted-1 font-sans ",
Expand All @@ -19,8 +19,8 @@ const size = {
xs: "h-8 px-2 text-xs",
sm: "h-9 px-3 text-xs",
square: 'h-10 py-2 px-2 text-sm aspect-square',
default: "h-10 py-2 px-4 text-sm md:text-base min-w-0",
lg: "h-10 px-8 text-sm md:text-base min-w-0 md:min-w-[260px] lg:min-w-[300px]",
default: "h-10 py-2 px-4 text-sm md:text-base font-semibold min-w-0",
lg: "h-10 px-8 text-sm md:text-base font-semibold min-w-0 md:min-w-[260px] lg:min-w-[300px]",
icon: "h-10 w-10",
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/types/button-def.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ButtonProps } from '../primitives/button'

type SubmitServerAction = (data: any, enclosure?: any) => Promise<void>
type SubmitServerAction = (data: any, enclosure?: any) => Promise<any>

interface ButtonModalProps {
open: boolean
Expand Down
11 changes: 0 additions & 11 deletions packages/ui/types/contact-info.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/ui/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export type {
ButtonModalDef,
} from './button-def'

export type { ContactInfo, ContactInfoFields } from './contact-info'
export type { default as Dimensions } from './dimensions'

export type { default as GridDef, GridColumnSpec } from './grid-def'
Expand Down

0 comments on commit 1d746db

Please sign in to comment.