docs-hub icon indicating copy to clipboard operation
docs-hub copied to clipboard

feature: code snippet component

Open cold-briu opened this issue 1 year ago • 0 comments

"Working with commands is one of the key elements of the docs experience. It always comes to 3 things:

What it does

What's the command I need to copy-paste

What's the expected result.

Currently the docs hub is using for wrapping all of the above.

What about creating a component that includes these aspect in a more friendly way? ie: Something like the graphql recipes component made by Sarah but with the following features:

The component is a card.

The card title describes the behavior of the component

The card contains a "copy button" that copies the command but not the '$'

The card includes a section showing the output"

We can format outputs differently than inputs

cold-briu avatar Oct 12 '23 00:10 cold-briu