diff --git a/.vscode/settings.json b/.vscode/settings.json index 124dc6d..1947a0d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" } } diff --git a/package.json b/package.json index cb07782..684a439 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@marceloglacial/brinca-ui", - "version": "1.14.0", + "version": "1.15.0", "author": "Marcelo Glacial", "type": "module", "repository": { diff --git a/src/components/Button/ButtonStyles.ts b/src/components/Button/ButtonStyles.ts index 613d140..b80d422 100644 --- a/src/components/Button/ButtonStyles.ts +++ b/src/components/Button/ButtonStyles.ts @@ -6,7 +6,7 @@ const styles = { full: `button--full-width w-full`, size: { sm: `py-1 px-4 `, - md: `py-2 lg:py-3 px-8 lg:px-10`, + md: `py-2 px-8 lg:py-3 lg:px-10`, lg: `py-3 px-10 lg:py-4 lg:px-12`, }, } diff --git a/src/components/Link/Link.tsx b/src/components/Link/Link.tsx index 947968b..49f830e 100644 --- a/src/components/Link/Link.tsx +++ b/src/components/Link/Link.tsx @@ -13,10 +13,12 @@ export interface LinkProps { export const Link: React.FC = (props): JSX.Element => { const { variant = 'default', children, full, size = 'md' } = props const isFullClassName = full ? styles.full : '' + const isButton = !['default', 'white'].includes(variant) + const linkSize = isButton ? styles.size[size] : '' const componentProps = { ...props, full: undefined, - className: `${styles[variant]} ${isFullClassName} ${styles.size[size]} `, + className: `${styles[variant]} ${isFullClassName} ${linkSize} `, } return
{children}
} diff --git a/src/components/Link/LinkStyles.ts b/src/components/Link/LinkStyles.ts index 8c98986..116acec 100644 --- a/src/components/Link/LinkStyles.ts +++ b/src/components/Link/LinkStyles.ts @@ -5,8 +5,8 @@ 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}`, - default: `link font-normal hover:text-green-600 after:bg-green-600 ${afterLine}`, - white: `link--white font-normal text-white after:bg-white ${afterLine}`, + 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`, size: button.size, }