/* Copyright (c) 2018-2020 Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ // @flow import React from 'react'; import {getOverrides} from '../helpers/overrides.js'; import { StyledLabelContent, StyledLabelDescription, StyledLabelSublistContent, } from './styled-components.js'; import type {LabelPropsT} from './types.js'; function ListItemLabel(props: LabelPropsT) { const {overrides = {}} = props; const [LabelSublistContent, labelSublistContentProps] = getOverrides( overrides.LabelSublistContent, StyledLabelSublistContent, ); const [LabelContent, labelContentProps] = getOverrides( overrides.LabelContent, StyledLabelContent, ); const [LabelDescription, labelDescriptionProps] = getOverrides( overrides.LabelDescription, StyledLabelDescription, ); if (props.sublist) { return ( {props.children} ); } return (
{props.children} {props.description && ( {props.description} )}
); } export default ListItemLabel; declare var __DEV__: boolean; declare var __NODE__: boolean; declare var __BROWSER__: boolean;