Skip to content

Props interface for Arrow component #58

Open
@MarisHeinols

Description

@MarisHeinols

I am trying to add custom arrow in project that uses typescript for all other components like Int, KetName I found interfaces to use but for Arrow component can't find interface that would include data-expanded prop. As this type provided by IDE does not include such value - render?: ((props: SymbolsElement<"span">) => React.ReactNode) | undefined

<JsonView.Arrow
// eslint-disable-next-line @typescript-eslint/no-explicit-any
render={(props: any) => {
console.log(props);
const isExpanded = props['data-expanded'];
return (
<img
style={{
cursor: 'pointer',
width: '0.7rem',
marginRight: 10,
rotate: isExpanded ? '0deg' : '270deg',
}}
src="/icons/forms_selector.svg"
/>
);
}}
/>

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