Skip to content

Commit

Permalink
fix: replace border-gray-300 with a themable colour (#664)
Browse files Browse the repository at this point in the history
Co-authored-by: Aman Harwara <amanharwara@protonmail.com>
  • Loading branch information
gorjan5sk and amanharwara authored Nov 1, 2021
1 parent 4f56c45 commit 32ced95
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const baseClass = `rounded px-4 py-1.75 font-bold text-sm fit-content`;
type ButtonType = 'normal' | 'primary' | 'danger';

const buttonClasses: { [type in ButtonType]: string } = {
normal: `${baseClass} bg-default color-text border-solid border-gray-300 border-1 focus:bg-contrast hover:bg-contrast`,
normal: `${baseClass} bg-default color-text border-solid border-neutral border-1 focus:bg-contrast hover:bg-contrast`,
primary: `${baseClass} no-border bg-info color-info-contrast hover:brightness-130 focus:brightness-130`,
danger: `${baseClass} bg-default color-danger border-solid border-gray-300 border-1 focus:bg-contrast hover:bg-contrast`,
danger: `${baseClass} bg-default color-danger border-solid border-neutral border-1 focus:bg-contrast hover:bg-contrast`,
};

export const Button: FunctionComponent<{
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/DecoratedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const DecoratedInput: FunctionalComponent<Props> = ({
'rounded py-1.5 px-3 text-input my-1 h-8 flex flex-row items-center bg-contrast';
const stateClasses = disabled
? 'no-border'
: 'border-solid border-1 border-gray-300';
: 'border-solid border-1 border-neutral';
const classes = `${baseClasses} ${stateClasses} ${className}`;

const inputBaseClasses = 'w-full no-border color-text focus:shadow-none bg-contrast';
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const Input: FunctionalComponent<Props> = ({
const base = `rounded py-1.5 px-3 text-input my-1 h-8 bg-contrast`;
const stateClasses = disabled
? 'no-border'
: 'border-solid border-1 border-gray-300';
: 'border-solid border-1 border-neutral';
const classes = `${base} ${stateClasses} ${className}`;
return (
<input type="text" className={classes} disabled={disabled} value={text} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ type Props = {
export const HorizontalSeparator: FunctionalComponent<Props> = ({
classes = ''
}) => {
return <hr className={`h-1px w-full bg-border no-border ${classes}`} />;
return <hr className={`h-1px w-full bg-neutral no-border ${classes}`} />;
};
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/shared/ModalDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ModalDialogLabel: FunctionComponent<{
Close
</div>
</div>
<hr className="h-1px bg-border no-border m-0" />
<hr className="h-1px bg-neutral no-border m-0" />
</AlertDialogLabel>
);

Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/preferences/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const Text: FunctionComponent<{ className?: string }> = ({
}) => <p className={`${className} text-xs`}>{children}</p>;

const buttonClasses = `block bg-default color-text rounded border-solid \
border-1 border-gray-300 px-4 py-1.75 font-bold text-sm fit-content \
focus:bg-contrast hover:bg-contrast`;
border-1 px-4 py-1.75 font-bold text-sm fit-content \
focus:bg-contrast hover:bg-contrast border-neutral`;

export const LinkButton: FunctionComponent<{
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const HorizontalLine: FunctionComponent<{ index: number; length: number }> = ({
}) => (index < length - 1 ? <HorizontalSeparator classes="my-4" /> : null);

export const PreferencesGroup: FunctionComponent = ({ children }) => (
<div className="bg-default border-1 border-solid rounded border-gray-300 px-6 py-6 flex flex-col mb-3">
<div className="bg-default border-1 border-solid rounded border-neutral px-6 py-6 flex flex-col mb-3">
{Array.isArray(children)
? children
.filter(
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/_preferences.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

&:hover {
@extend .border-gray-300;
@extend .border-neutral;
@extend .border-solid;
@extend .border-1;
@extend .bg-default;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/_sn.scss
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@

@extend .border-bottom-solid;
@extend .border-b-1;
@extend .border-gray-300;
@extend .border-neutral;

@extend .py-3;
@extend .px-3;
Expand Down

0 comments on commit 32ced95

Please sign in to comment.