Skip to content

Commit

Permalink
feat: allow slider mark to be themed
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Aug 26, 2022
1 parent 839c105 commit 5e6c3fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/clean-yaks-appear.md
@@ -0,0 +1,6 @@
---
"@chakra-ui/anatomy": patch
"@chakra-ui/slider": patch
---

Allow slider mark to be themable
1 change: 1 addition & 0 deletions packages/components/anatomy/src/components.ts
Expand Up @@ -117,6 +117,7 @@ export const sliderAnatomy = anatomy("slider").parts(
"track",
"thumb",
"filledTrack",
"mark",
)

export const statAnatomy = anatomy("stat").parts(
Expand Down
2 changes: 2 additions & 0 deletions packages/components/slider/src/slider.tsx
Expand Up @@ -149,11 +149,13 @@ export interface SliderMarkProps extends HTMLChakraProps<"div"> {
*/
export const SliderMark = forwardRef<SliderMarkProps, "div">((props, ref) => {
const { getMarkerProps } = useSliderContext()
const styles = useSliderStyles()
const markProps = getMarkerProps(props, ref)
return (
<chakra.div
{...markProps}
className={cx("chakra-slider__marker", props.className)}
__css={styles.mark}
/>
)
})
Expand Down

1 comment on commit 5e6c3fd

@vercel
Copy link

@vercel vercel bot commented on 5e6c3fd Aug 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.