Skip to content

Add Typing for Slots #239

@aress31

Description

@aress31

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" } } }}
  />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions