Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Typing for Slots #239

Open
aress31 opened this issue Jan 20, 2025 · 0 comments
Open

Add Typing for Slots #239

aress31 opened this issue Jan 20, 2025 · 0 comments

Comments

@aress31
Copy link

aress31 commented Jan 20, 2025

I want to add a labelId to the component - which is not a direct prop. Therefore, I assume it should be passed via slots, but since there is no typing or documentation specifying the available components for the slot, I'm unsure which components can be used. Here's the code I'm working with:

const { value, labelId, ...fieldProps } = field;

return (
  <MDEditor
    {...fieldProps}
    data-color-mode={palette.mode}
    preview="edit"
    style={{ marginTop: 48 }}
    value={value ?? ""}
    slot={{ textarea: { style: { backgroundColor: "teal" } } }}
  />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant