Skip to content
Merged
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
12 changes: 9 additions & 3 deletions src/components/Slider/Slider.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type { Meta, StoryObj } from '@storybook/react'
import { useState } from 'react'
import { Text, View } from 'react-native'

import { StyleSheet } from 'react-native-unistyles'

import { Slider, type SliderProps } from './Slider'

const meta: Meta<typeof Slider> = {
Expand Down Expand Up @@ -32,8 +34,8 @@ const Template = (args: SliderProps) => {
return (
<View style={{ gap: 20 }}>
<View style={{ gap: 10 }}>
<Text>{positionMinRange.toFixed(0)}</Text>
<Text>{positionMaxRange.toFixed(0)}</Text>
<Text style={styles.label}>{positionMinRange.toFixed(0)}</Text>
<Text style={styles.label}>{positionMaxRange.toFixed(0)}</Text>
<Slider
{...args}
range
Expand All @@ -45,7 +47,7 @@ const Template = (args: SliderProps) => {
</View>

<View style={{ gap: 10 }}>
<Text>{positionMin.toFixed(0)}</Text>
<Text style={styles.label}>{positionMin.toFixed(0)}</Text>
<Slider
{...args}
minPointerValueInit={40}
Expand All @@ -57,6 +59,10 @@ const Template = (args: SliderProps) => {
)
}

const styles = StyleSheet.create(({ semantic }) => ({
label: { color: semantic.colorScheme.color.fg.default },
}))

export default meta

type Story = StoryObj<typeof Slider>
Expand Down
Loading