fix(dashboard): allow style overrides on primary and secondary buttons
This commit is contained in:
@@ -291,6 +291,7 @@ type BtnProps = {
|
||||
type?: "button" | "submit";
|
||||
disabled?: boolean;
|
||||
danger?: boolean;
|
||||
style?: React.CSSProperties;
|
||||
};
|
||||
|
||||
const btnBase: React.CSSProperties = {
|
||||
@@ -313,6 +314,7 @@ export function PrimaryButton({
|
||||
onClick,
|
||||
type = "button",
|
||||
disabled,
|
||||
style,
|
||||
}: BtnProps) {
|
||||
const [hover, setHover] = useState(false);
|
||||
return (
|
||||
@@ -328,6 +330,7 @@ export function PrimaryButton({
|
||||
color: THEME.accentText,
|
||||
border: `1px solid ${hover ? THEME.accentHover : THEME.accent}`,
|
||||
opacity: disabled ? 0.5 : 1,
|
||||
...style,
|
||||
}}
|
||||
>
|
||||
{icon}
|
||||
@@ -343,6 +346,7 @@ export function SecondaryButton({
|
||||
type = "button",
|
||||
disabled,
|
||||
danger,
|
||||
style,
|
||||
}: BtnProps) {
|
||||
const [hover, setHover] = useState(false);
|
||||
const color = danger ? THEME.danger : THEME.ink;
|
||||
@@ -364,6 +368,7 @@ export function SecondaryButton({
|
||||
color,
|
||||
border: `1px solid ${borderColor}`,
|
||||
opacity: disabled ? 0.5 : 1,
|
||||
...style,
|
||||
}}
|
||||
>
|
||||
{icon}
|
||||
|
||||
Reference in New Issue
Block a user