fix: replace border-gray-300 with a themable colour (#664)
Co-authored-by: Aman Harwara <amanharwara@protonmail.com>
This commit is contained in:
@@ -9,9 +9,9 @@ const baseClass = `rounded px-4 py-1.75 font-bold text-sm fit-content`;
|
|||||||
type ButtonType = 'normal' | 'primary' | 'danger';
|
type ButtonType = 'normal' | 'primary' | 'danger';
|
||||||
|
|
||||||
const buttonClasses: { [type in ButtonType]: string } = {
|
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`,
|
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<{
|
export const Button: FunctionComponent<{
|
||||||
|
|||||||
@@ -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';
|
'rounded py-1.5 px-3 text-input my-1 h-8 flex flex-row items-center bg-contrast';
|
||||||
const stateClasses = disabled
|
const stateClasses = disabled
|
||||||
? 'no-border'
|
? 'no-border'
|
||||||
: 'border-solid border-1 border-gray-300';
|
: 'border-solid border-1 border-neutral';
|
||||||
const classes = `${baseClasses} ${stateClasses} ${className}`;
|
const classes = `${baseClasses} ${stateClasses} ${className}`;
|
||||||
|
|
||||||
const inputBaseClasses = 'w-full no-border color-text focus:shadow-none bg-contrast';
|
const inputBaseClasses = 'w-full no-border color-text focus:shadow-none bg-contrast';
|
||||||
|
|||||||
@@ -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 base = `rounded py-1.5 px-3 text-input my-1 h-8 bg-contrast`;
|
||||||
const stateClasses = disabled
|
const stateClasses = disabled
|
||||||
? 'no-border'
|
? 'no-border'
|
||||||
: 'border-solid border-1 border-gray-300';
|
: 'border-solid border-1 border-neutral';
|
||||||
const classes = `${base} ${stateClasses} ${className}`;
|
const classes = `${base} ${stateClasses} ${className}`;
|
||||||
return (
|
return (
|
||||||
<input type="text" className={classes} disabled={disabled} value={text} />
|
<input type="text" className={classes} disabled={disabled} value={text} />
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ type Props = {
|
|||||||
export const HorizontalSeparator: FunctionalComponent<Props> = ({
|
export const HorizontalSeparator: FunctionalComponent<Props> = ({
|
||||||
classes = ''
|
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}`} />;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export const ModalDialogLabel: FunctionComponent<{
|
|||||||
Close
|
Close
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr className="h-1px bg-border no-border m-0" />
|
<hr className="h-1px bg-neutral no-border m-0" />
|
||||||
</AlertDialogLabel>
|
</AlertDialogLabel>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ export const Text: FunctionComponent<{ className?: string }> = ({
|
|||||||
}) => <p className={`${className} text-xs`}>{children}</p>;
|
}) => <p className={`${className} text-xs`}>{children}</p>;
|
||||||
|
|
||||||
const buttonClasses = `block bg-default color-text rounded border-solid \
|
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 \
|
border-1 px-4 py-1.75 font-bold text-sm fit-content \
|
||||||
focus:bg-contrast hover:bg-contrast`;
|
focus:bg-contrast hover:bg-contrast border-neutral`;
|
||||||
|
|
||||||
export const LinkButton: FunctionComponent<{
|
export const LinkButton: FunctionComponent<{
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const HorizontalLine: FunctionComponent<{ index: number; length: number }> = ({
|
|||||||
}) => (index < length - 1 ? <HorizontalSeparator classes="my-4" /> : null);
|
}) => (index < length - 1 ? <HorizontalSeparator classes="my-4" /> : null);
|
||||||
|
|
||||||
export const PreferencesGroup: FunctionComponent = ({ children }) => (
|
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)
|
{Array.isArray(children)
|
||||||
? children
|
? children
|
||||||
.filter(
|
.filter(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@extend .border-gray-300;
|
@extend .border-neutral;
|
||||||
@extend .border-solid;
|
@extend .border-solid;
|
||||||
@extend .border-1;
|
@extend .border-1;
|
||||||
@extend .bg-default;
|
@extend .bg-default;
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
|
|
||||||
@extend .border-bottom-solid;
|
@extend .border-bottom-solid;
|
||||||
@extend .border-b-1;
|
@extend .border-b-1;
|
||||||
@extend .border-gray-300;
|
@extend .border-neutral;
|
||||||
|
|
||||||
@extend .py-3;
|
@extend .py-3;
|
||||||
@extend .px-3;
|
@extend .px-3;
|
||||||
|
|||||||
Reference in New Issue
Block a user