Skip to content

Commit

Permalink
Merge branch 'release/1.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloglacial committed Aug 9, 2024
2 parents 6f2240f + e5fce14 commit 70e8232
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@marceloglacial/brinca-ui",
"version": "1.16.0",
"version": "1.17.0",
"author": "Marcelo Glacial",
"type": "module",
"repository": {
Expand Down
4 changes: 3 additions & 1 deletion src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export const Button: React.FC<ButtonProps & JSX.IntrinsicElements['button']> = (
const componentProps = {
...props,
full: undefined,
className: `${styles.button} ${styles[variant]} ${fullClassName} ${styles.size[size]} ${disabledClassName}`,
className: disabled
? `${styles.button} ${disabledClassName} ${styles.size[size]}`
: `${styles.button} ${styles[variant]} ${fullClassName} ${styles.size[size]}`,
}
return <button {...componentProps}>{children}</button>
}
6 changes: 3 additions & 3 deletions src/components/Button/ButtonStyles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const styles = {
button: `button inline-block text-center rounded-full transition-all border-2 border-green-600 font-normal whitespace-nowrap`,
primary: `button--primary bg-green-600 text-white hover:bg-white hover:text-green-600`,
secondary: `button--secondary text-green-600 hover:bg-green-600 hover:text-white`,
button: `button inline-block text-center rounded-full transition-all border-2 font-normal whitespace-nowrap`,
primary: `button--primary border-green-600 bg-green-600 text-white hover:bg-white hover:text-green-600`,
secondary: `button--secondary border-green-600 text-green-600 hover:bg-green-600 hover:text-white`,
disabled: `button--disabled text-gray-400 border-gray-300 bg-gray-50 cursor-not-allowed hover:text-gray-400 hover:border-gray-300 hover:bg-gray-50`,
full: `button--full-width w-full`,
size: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface LayoutProps {
export const Layout: FC<LayoutProps & JSX.IntrinsicElements['div']> = (props): JSX.Element => {
const { header, footer, children } = props
return (
<div {...props} className={`${styles.container} `}>
<div className={`${styles.container}`}>
<header>{header}</header>
<main>{children}</main>
<footer>{footer}</footer>
Expand Down
6 changes: 6 additions & 0 deletions src/components/Link/Link.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ export const White = (props) => (
</Link>
</div>
)

export const Disabled = (props) => (
<Link href='#' variant='disabled' {...props}>
Disabled
</Link>
)
1 change: 1 addition & 0 deletions src/components/Link/LinkStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const afterLine = `after:w-0 relative after:absolute after:block after:h-[3px] a
const styles = {
primary: `link link--primary ${button.button} ${button.primary}`,
secondary: `link link--secondary ${button.button} ${button.secondary}`,
disabled: `link link--disabled ${button.button} ${button.disabled}`,
default: `link inline font-normal hover:text-green-600 after:bg-green-600 ${afterLine}`,
white: `link--white inline font-normal text-white after:bg-white ${afterLine}`,
full: `link--full ${button.full} inline-block text-center`,
Expand Down
1 change: 1 addition & 0 deletions src/components/NavBar/NavBarItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const NavBarItems: FC<NavBarItemsProps & JSX.IntrinsicElements['div']> = (props)
<div
{...props}
className={`${styles.items.container} ${styles.items[variant]} ${isOpenClassName} `}
onClick={() => setIsOpen(false)}
>
{children}
</div>
Expand Down

0 comments on commit 70e8232

Please sign in to comment.