Skip to content

Update API to Use Child Components Instead of lineData prop #3

@jonmbake

Description

@jonmbake

Is your feature request related to a problem? Please describe.
The current API is not great. lineData is passed as a prop, which the Terminal component renders as child props.

Describe the solution you'd like
A better design would be for the Terminal component to take terminal lines as a child component, something like:

<Terminal name='React Terminal Usage Example' colorMode={ ColorMode.Light }>
  <TerminalOutput>Welcome to the React Terminal UI Demo!</TerminalOutput>
  <TerminalInput>Some input received</TerminalInput>
</Terminal>

Describe alternatives you've considered
Leave as is. The existing solution works. However, it is not in line with best practices for React.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis is a breaking API change.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions