Skip to content

Commit

Permalink
fix: coderabbit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
limsohee1002 committed Nov 13, 2024
1 parent 50735ea commit d05fa87
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 65 deletions.
6 changes: 1 addition & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ module.exports = {
blogSidebarCount: 0,
},
theme: {
customCss: [
require.resolve('./src/css/font.css'),
require.resolve('./src/css/types.css'),
require.resolve('./src/css/custom.css'),
],
customCss: [require.resolve('./src/css/custom.css')],
},
},
],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.3",
"@tsconfig/docusaurus": "^1.0.6",
"@types/js-cookie": "^3.0.6",
"@typescript-eslint/eslint-plugin": "^4",
"@typescript-eslint/parser": "^4",
"autoprefixer": "^10.4.20",
Expand Down
4 changes: 3 additions & 1 deletion src/components/base/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type ButtonBaseProps = {
onClick?: () => void
ariaLabel?: string
role?: string
type?: 'button' | 'submit' | 'reset'
}

export const ButtonBase: FC<PropsWithChildren<ButtonBaseProps>> = ({
Expand All @@ -51,9 +52,10 @@ export const ButtonBase: FC<PropsWithChildren<ButtonBaseProps>> = ({
children,
ariaLabel,
role,
type = 'button',
}) => {
return (
<button onClick={onClick} className={className} aria-label={ariaLabel} role={role}>
<button onClick={onClick} className={className} aria-label={ariaLabel} role={role} type={type}>
{children}
</button>
)
Expand Down
17 changes: 9 additions & 8 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
*/

/* You can override the default Infima variables here. */
@import './infma-overrides.css';
@import './infima-overrides.css';

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

:root {
.site-max-width {
max-width: 1440px;
}
@import './font.css';
@import './types.css';

.default-grid {
@apply grid grid-cols-4 gap-gap-large sm:grid-cols-8;
}
.site-max-width {
max-width: 1440px;
}

.default-grid {
@apply grid grid-cols-4 gap-gap-large sm:grid-cols-8;
}
74 changes: 26 additions & 48 deletions src/css/infma-overrides.css → src/css/infima-overrides.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
button,
a {
all: initial;
}

button:hover,
a:hover {
text-decoration: none;
color: inherit;
cursor: pointer;
}

ul {
all: initial;
display: block;
list-style-type: none;
}

* {
font-weight: unset;
border-style: solid;
border-width: 0;
border-color: unset;
font-style: unset;
}

/* Box sizing rules */
*,
*::before,
Expand Down Expand Up @@ -76,51 +102,3 @@ select {
scroll-behavior: auto !important;
}
}

button {
text-rendering: unset;
color: unset;
letter-spacing: unset;
word-spacing: unset;
line-height: unset;
text-transform: unset;
text-indent: unset;
text-shadow: unset;
display: unset;
text-align: unset;
align-items: unset;
cursor: pointer;
box-sizing: unset;
background-color: unset;
margin: unset;
padding-block: unset;
padding-inline: unset;
border-width: unset;
border-style: unset;
border-color: unset;
border-image: unset;
}

ul {
display: block;
list-style-type: none;
margin-block-start: unset;
margin-block-end: unset;
margin-inline-start: unset;
margin-inline-end: unset;
padding-inline-start: unset;
unicode-bidi: unset;
}

a:hover {
text-decoration: none;
}

* {
font-weight: unset;
font-style: unset;
border-style: solid;
border-width: 0;
border-color: unset;
font-style: normal;
}
8 changes: 5 additions & 3 deletions src/theme/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Navbar: FC = () => {
return (
<nav className="Navbar fixed left-0 right-0 z-nav flex w-screen justify-center bg-light-surface-1 dark:border-dark-surface-3 dark:bg-dark-surface-1">
<div className="w-full h-nav-h flex flex-row justify-between items-center px-4 py-[1.15625rem] sm:px-[0.9375rem] sm:py-3">
<a className="flex flex-row items-center" href="/" target="_self">
<a className="flex flex-row items-center" href="/" target="_self" aria-label="Uniswap Documentation Home">
<MiniUnicon className="w-8 h-8 mr-3" />
<p className="Navbar__logo-text body-1 text-light-accent-1 dark:text-dark-accent-1 mb-0">Uniswap Docs</p>
</a>
Expand All @@ -26,10 +26,12 @@ const Navbar: FC = () => {
<div className="hidden md:flex flex-row items-center">
<ThemeSwitch />
<a
className="button-label-4 text-light-accent-1 dark:text-dark-accent-1 py-2 px-3 bg-light-accent-2 dark:bg-dark-accent-2 rounded-small ml-2"
className="button-label-4 py-2 px-3 bg-light-accent-2 dark:bg-dark-accent-2 rounded-small ml-2"
href="https://docs.google.com/forms/d/e/1FAIpQLSdjSkZam8KiatL9XACRVxCHjDJjaPGbls77PCXDKFn4JwykXg/viewform"
target="_blank"
rel="noreferrer"
>
Submit Feedback
<span className="text-light-accent-1 dark:text-dark-accent-1">Submit Feedback</span>
</a>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,11 @@
dependencies:
"@types/istanbul-lib-report" "*"

"@types/js-cookie@^3.0.6":
version "3.0.6"
resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-3.0.6.tgz#a04ca19e877687bd449f5ad37d33b104b71fdf95"
integrity sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==

"@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
version "7.0.15"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
Expand Down

0 comments on commit d05fa87

Please sign in to comment.