rc-segmented
Advanced tools
Comparing version 1.0.0 to 1.1.0
import * as React from 'react'; | ||
export declare type SegmentedValue = string | number; | ||
declare type RawOption = SegmentedValue; | ||
interface LabeledOption { | ||
declare type SegmentedRawOption = SegmentedValue; | ||
interface SegmentedLabeledOption { | ||
className?: string; | ||
disabled?: boolean; | ||
label: React.ReactNode; | ||
value: RawOption; | ||
value: SegmentedRawOption; | ||
} | ||
declare type Option = RawOption | LabeledOption; | ||
declare type Options = Option[]; | ||
declare type SegmentedOptions = (SegmentedRawOption | SegmentedLabeledOption)[]; | ||
declare type ExtendedHTMLInputElement = Omit<HTMLInputElement, 'value'> & { | ||
@@ -16,3 +15,3 @@ value: SegmentedValue; | ||
export interface SegmentedProps extends React.HTMLProps<HTMLDivElement> { | ||
options: Options; | ||
options: SegmentedOptions; | ||
defaultValue?: SegmentedValue; | ||
@@ -19,0 +18,0 @@ value?: SegmentedValue; |
@@ -34,3 +34,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
var SegmentedOption = function SegmentedOption(_ref) { | ||
var InternalSegmentedOption = function InternalSegmentedOption(_ref) { | ||
var prefixCls = _ref.prefixCls, | ||
@@ -193,3 +193,3 @@ className = _ref.className, | ||
}), segmentedOptions.map(function (segmentedOption) { | ||
return /*#__PURE__*/React.createElement(SegmentedOption, _objectSpread({ | ||
return /*#__PURE__*/React.createElement(InternalSegmentedOption, _objectSpread({ | ||
key: segmentedOption.value, | ||
@@ -196,0 +196,0 @@ prefixCls: prefixCls, |
import * as React from 'react'; | ||
export declare type SegmentedValue = string | number; | ||
declare type RawOption = SegmentedValue; | ||
interface LabeledOption { | ||
declare type SegmentedRawOption = SegmentedValue; | ||
interface SegmentedLabeledOption { | ||
className?: string; | ||
disabled?: boolean; | ||
label: React.ReactNode; | ||
value: RawOption; | ||
value: SegmentedRawOption; | ||
} | ||
declare type Option = RawOption | LabeledOption; | ||
declare type Options = Option[]; | ||
declare type SegmentedOptions = (SegmentedRawOption | SegmentedLabeledOption)[]; | ||
declare type ExtendedHTMLInputElement = Omit<HTMLInputElement, 'value'> & { | ||
@@ -16,3 +15,3 @@ value: SegmentedValue; | ||
export interface SegmentedProps extends React.HTMLProps<HTMLDivElement> { | ||
options: Options; | ||
options: SegmentedOptions; | ||
defaultValue?: SegmentedValue; | ||
@@ -19,0 +18,0 @@ value?: SegmentedValue; |
@@ -56,3 +56,3 @@ "use strict"; | ||
var SegmentedOption = function SegmentedOption(_ref) { | ||
var InternalSegmentedOption = function InternalSegmentedOption(_ref) { | ||
var prefixCls = _ref.prefixCls, | ||
@@ -214,3 +214,3 @@ className = _ref.className, | ||
}), segmentedOptions.map(function (segmentedOption) { | ||
return /*#__PURE__*/React.createElement(SegmentedOption, (0, _objectSpread2.default)({ | ||
return /*#__PURE__*/React.createElement(InternalSegmentedOption, (0, _objectSpread2.default)({ | ||
key: segmentedOption.value, | ||
@@ -217,0 +217,0 @@ prefixCls: prefixCls, |
{ | ||
"name": "rc-segmented", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "React segmented controls used in ant.design", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39062
515