Skip to content

Conversation

@tdgao
Copy link
Contributor

@tdgao tdgao commented Nov 23, 2025

No description provided.

Comment on lines +20 to +29
const defaultNextButton = {
icon: RightArrowIcon,
label: formatMessage(commonMessages.nextButton),
disabled: false,
color: 'standard' as const,
iconPosition: 'after' as const,
onClick: () => modal.value?.nextStage(),
}

const defaultBackButton = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could be put into the modal itself, e.g if true is passed rather than this btn config, it uses the defaults for that button slot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to sync on how we wanna have the default config for buttons. I want it to be exportable so you can override the defaults like how I have it in this modal, and seems like can't be exported in MultiStageModal nicely, since it uses some of the component's click handlers.

(e: 'remove'): void
}>()
const { name, icon, dependencyType, versionName } = defineProps<{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really use this format for props (e.g usually const props = ...), but honestly its nice - maybe we should start doing it this way a bit more for things like this.

import type { Labrinth } from '@modrinth/api-client'
import { createContext } from '@modrinth/ui'

export const [injectVersionsContext, provideVersionsContext] = createContext<{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, it would probably be better to handle this as part of the wider project page context?

@tdgao tdgao requested a review from Prospector December 2, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants