UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

26 lines (25 loc) 1.08 kB
import React from "react"; import { SpaceProps } from "styled-system"; import { TagProps } from "../../__internal__/utils/helpers/tags"; type ElementAlignment = "left" | "center" | "right"; export interface DlProps extends SpaceProps, TagProps { /** HTML id attribute of the input */ id?: string; /** prop to render children. */ children: React.ReactNode; /** This value will specify the width of the `StyledDtDiv` as a percentage. The remaining space will be taken up by the `StyledDdDiv`. This prop has no effect when `asSingleColumn` is set. */ w?: number; /** Render the DefinitionList as a single column */ asSingleColumn?: boolean; /** This string will specify the text align styling of the `<dt></dt>`. */ dtTextAlign?: ElementAlignment; /** This string will specify the text align styling of the `<dd></dd>`. */ ddTextAlign?: ElementAlignment; } declare const Dl: { ({ children, w, dtTextAlign, ddTextAlign, asSingleColumn, ...rest }: DlProps): React.JSX.Element; displayName: string; }; export default Dl;