芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/react-select/src/components/SingleValue.js
// @flow /** @jsx jsx */ import type { CommonProps } from '../types'; import { jsx } from '@emotion/react'; type State = { /** Whether this is disabled. */ isDisabled: boolean, }; type ValueProps = { /** The children to be rendered. */ children: React$Node, /* The data of the selected option rendered in the Single Value component. */ data: any, /** Props passed to the wrapping element for the group. */ innerProps: any, }; export type SingleValueProps = CommonProps & ValueProps & State; export const css = ({ isDisabled, theme: { spacing, colors }, }: SingleValueProps) => ({ label: 'singleValue', color: isDisabled ? colors.neutral40 : colors.neutral80, marginLeft: spacing.baseUnit / 2, marginRight: spacing.baseUnit / 2, maxWidth: `calc(100% - ${spacing.baseUnit * 2}px)`, overflow: 'hidden', position: 'absolute', textOverflow: 'ellipsis', whiteSpace: 'nowrap', top: '50%', transform: 'translateY(-50%)', }); const SingleValue = (props: SingleValueProps) => { const { children, className, cx, getStyles, isDisabled, innerProps } = props; return (
{children}
); }; export default SingleValue;