Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Fix `ChatMessage`'s focus border overlays `actionMenu` in Teams theme @mnajdova ([#1637](https://github.com/stardust-ui/react/pull/1637))
- Add `color` prop to `Segment` typings @layershifter ([#1702](https://github.com/stardust-ui/react/pull/1702))
- Remove `color` prop from `Dialog` typings @layershifter ([#1702](https://github.com/stardust-ui/react/pull/1702))
- `Loader` uses `Text` component for `label` slot instead of `Box` @layershifter ([#1701](https://github.com/stardust-ui/react/pull/1701))

### Documentation
- Make sidebar categories collapsible @lucivpav ([#1611](https://github.com/stardust-ui/react/pull/1611))
Expand Down
5 changes: 3 additions & 2 deletions packages/react/src/components/Loader/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { loaderBehavior } from '../../lib/accessibility'
import { Accessibility } from '../../lib/accessibility/types'
import { WithAsProp, ShorthandValue, withSafeTypeForAs } from '../../types'
import Box, { BoxProps } from '../Box/Box'
import Text, { TextProps } from '../Text/Text'

export interface LoaderSlotClassNames {
indicator: string
Expand All @@ -35,7 +36,7 @@ export interface LoaderProps extends UIComponentProps, ColorComponentProps {
inline?: boolean

/** A loader can contain a label. */
label?: ShorthandValue<BoxProps>
label?: ShorthandValue<TextProps>

/** A label in the loader can have different positions. */
labelPosition?: 'above' | 'below' | 'start' | 'end'
Expand Down Expand Up @@ -134,7 +135,7 @@ class Loader extends UIComponent<WithAsProp<LoaderProps>, LoaderState> {
styles: styles.indicator,
},
})}
{Box.create(label, {
{Text.create(label, {
defaultProps: { className: Loader.slotClassNames.label, styles: styles.label },
})}
</ElementType>
Expand Down