DefinitionList

관리자:
Raubzeug
GitHub
responsive
direction
import {DefinitionList} from '@gravity-ui/uikit';

The component to display definition list with term and definition separated by dots.

Examples

Node value with copy
value with copy
Empty value with copy
<DefinitionList nameMaxWidth={100} contentMaxWidth={100}>
    <DefinitionList.Item name="Node value with copy" copyText="value">
        <strong>value with copy</strong>
    </DefinitionList.Item>
    <DefinitionList.Item name="Empty value with copy" copyText="nothing to copy" />
</DefinitionList>

Properties

NameDescriptionTypeDefault
childrenItems of the listReact.ReactNode
responsiveIf set to true list will take 100% width of its parentboolean
directionIf set to vertical content will be located under name and list will take 100% width of its parent'horizontal' | 'vertical''horizontal'
nameMaxWidthMaximum width of termnumber
contentMaxWidthMaximum width of definitionnumber
classNameClass name for the definition liststring

Items

DefinitionList children should be components of type DefinitionList.Item with following properties:

NameDescriptionTypeDefault
nameTermReactNode
childrenDefinitionReactNode
copyTextIf set, it will be shown icon for copy this textstring
noteIf set, HelpMark will be shown next to termstring | HelpMarkProps

CSS API

NameDescription
--g-definition-list-item-gapSpace between definition list items