This commit is contained in:
thororen1234 2024-06-21 15:50:36 -04:00
parent 40a53e0da9
commit 2960e9a74a
21 changed files with 414 additions and 686 deletions

View file

@ -37,12 +37,11 @@ interface Props {
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
infoButton?: ReactNode;
hideSwitch?: boolean;
footer?: ReactNode;
author?: ReactNode;
}
export function AddonCard({ disabled, isNew, name, infoButton, footer, author, enabled, setEnabled, description, onMouseEnter, onMouseLeave, hideSwitch }: Props) {
export function AddonCard({ disabled, isNew, name, infoButton, footer, author, enabled, setEnabled, description, onMouseEnter, onMouseLeave }: Props) {
const titleRef = useRef<HTMLDivElement>(null);
const titleContainerRef = useRef<HTMLDivElement>(null);
return (
@ -79,11 +78,11 @@ export function AddonCard({ disabled, isNew, name, infoButton, footer, author, e
{infoButton}
{!hideSwitch && <Switch
<Switch
checked={enabled}
onChange={setEnabled}
disabled={disabled}
/>}
/>
</div>
<Text className={cl("note")} variant="text-sm/normal">{description}</Text>

View file

@ -28,20 +28,11 @@
content: "by ";
}
.vc-settings-theme-add-theme-content {
margin: 10px 0;
display: flex;
flex-direction: column;
gap: 10px;
.vc-settings-theme-link-input {
width: 100%;
}
.vc-settings-theme-add-theme-footer {
display: flex;
flex-direction: row;
gap: 10px;
justify-content: flex-end;
.vc-settings-theme-add-card {
padding: 1em;
margin-bottom: 16px;
}
.vc-settings-theme-add-theme-error {
color: var(--text-danger);
}