Skip to content

Commit

Permalink
types: fix S2 types/defaults (adobe#6917)
Browse files Browse the repository at this point in the history
  • Loading branch information
reidbarber authored Aug 20, 2024
1 parent 64e4a40 commit d27e833
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {
src,
UNSAFE_style,
UNSAFE_className = '',
size,
size = 24,
isOverBackground,
...otherProps
} = props;
Expand Down
8 changes: 5 additions & 3 deletions packages/@react-spectrum/s2/src/Meter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ import {useDOMRef} from '@react-spectrum/utils';
import {useSpectrumContextProps} from './useSpectrumContextProps';

interface MeterStyleProps {
/** The [visual style](https://spectrum.adobe.com/page/meter/#-Options) of the Meter. */
variant: 'informative' | 'positive' | 'notice' | 'negative',
/** The [visual style](https://spectrum.adobe.com/page/meter/#-Options) of the Meter.
* @default 'informative'
*/
variant?: 'informative' | 'positive' | 'notice' | 'negative',
/**
* The size of the Meter.
*
Expand Down Expand Up @@ -109,7 +111,7 @@ function Meter(props: MeterProps, ref: DOMRef<HTMLDivElement>) {
styles,
UNSAFE_className = '',
UNSAFE_style,
variant,
variant = 'informative',
...groupProps
} = props;

Expand Down
5 changes: 4 additions & 1 deletion packages/@react-spectrum/s2/src/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style' | '
styles?: StylesPropWithHeight,
/** The content to display in the tabs. */
children?: ReactNode,
/** The amount of space between the tabs. */
/**
* The amount of space between the tabs.
* @default "regular"
*/
density?: 'compact' | 'regular'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/TagGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ let _Tag = /*#__PURE__*/ (forwardRef as forwardRefType)(Tag);
export {_Tag as Tag};

function TagWrapper({children, isDisabled, allowsRemoving, isInRealDOM}) {
let {size} = useSlottedContext(TagGroupContext) ?? {};
let {size = 'M'} = useSlottedContext(TagGroupContext) ?? {};
return (
<>
{isInRealDOM && (
Expand Down

0 comments on commit d27e833

Please sign in to comment.