Skip to content

Commit

Permalink
Add missing prop to Spinner (#1489)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigpalermo committed May 3, 2024
1 parent ae35f97 commit cfad423
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "pcln-design-system",
"comment": "Add missing prop to Spinner",
"type": "patch"
}
],
"packageName": "pcln-design-system"
}
8 changes: 4 additions & 4 deletions packages/core/src/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ const GradientRingWrapper = styled(Absolute)`
height: 100%;
`

type GradientRingProps = {
export type GradientRingProps = {
strokeWidth?: string
color?: PaletteFamilyName
theme?: Theme
} & SpinnerProps
}

function GradientRing({ strokeWidth = '6px', ...props }: GradientRingProps) {
const strokeColor = getPaletteColor(props.color, 'base')(props)
Expand Down Expand Up @@ -124,9 +125,8 @@ export type SpinnerSizes = 'small' | 'medium' | 'large' | number
/**
* @public
*/
export type SpinnerProps = {
export type SpinnerProps = GradientRingProps & {
children?: React.ReactNode
color?: PaletteFamilyName
size?: SpinnerSizes | string | Array<SpinnerSizes | string>
useGradient?: boolean
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export { type ShimmerVariation, type ShimmerVariationType } from './Shimmer/cons
export { SkipMenu, type SkipMenuProps } from './SkipMenu/SkipMenu'
export { type ArrowPosition } from './SlideBox/Arrow'
export { SlideBox, type SlideBoxProps } from './SlideBox/SlideBox'
export { Spinner, type SpinnerProps, type SpinnerSizes } from './Spinner/Spinner'
export { Spinner, type GradientRingProps, type SpinnerProps, type SpinnerSizes } from './Spinner/Spinner'
export { SrOnly } from './SrOnly/SrOnly'
export { Stamp, type StampProps } from './Stamp/Stamp'
export { Step, type StepProps } from './Step/Step'
Expand Down

0 comments on commit cfad423

Please sign in to comment.