@@ -2,7 +2,8 @@ import {useState} from 'react'
2
2
import type { Meta } from '@storybook/react-vite'
3
3
import { SegmentedControl } from '.'
4
4
import { EyeIcon , FileCodeIcon , PeopleIcon } from '@primer/octicons-react'
5
- import { Box , Text } from '..'
5
+ import { Text } from '..'
6
+ import classes from './SegmentedControl.features.stories.module.css'
6
7
7
8
export default {
8
9
title : 'Components/SegmentedControl/Features' ,
@@ -122,29 +123,20 @@ export const IconOnly = () => (
122
123
IconOnly . storyName = 'Icon only'
123
124
124
125
export const AssociatedWithALabelAndCaption = ( ) => (
125
- < Box
126
- display = "flex"
127
- sx = { theme => ( {
128
- flexDirection : 'column' ,
129
- gap : theme . space [ 1 ] ,
130
- [ `@media screen and (min-width: ${ theme . breakpoints [ 1 ] } )` ] : {
131
- flexDirection : 'row' ,
132
- } ,
133
- } ) }
134
- >
135
- < Box flexGrow = { 1 } >
126
+ < div className = { classes . LabelAndCaptionContainer } >
127
+ < div className = { classes . LabelAndCaption } >
136
128
< Text fontSize = { 2 } fontWeight = "bold" id = "scLabel-vert" display = "block" >
137
129
File view
138
130
</ Text >
139
131
< Text color = "fg.subtle" fontSize = { 1 } id = "scCaption-vert" display = "block" >
140
132
Change the way the file is viewed
141
133
</ Text >
142
- </ Box >
134
+ </ div >
143
135
< SegmentedControl aria-labelledby = "scLabel-vert" aria-describedby = "scCaption-vert" >
144
136
< SegmentedControl . Button defaultSelected > Preview</ SegmentedControl . Button >
145
137
< SegmentedControl . Button > Raw</ SegmentedControl . Button >
146
138
< SegmentedControl . Button > Blame</ SegmentedControl . Button >
147
139
</ SegmentedControl >
148
- </ Box >
140
+ </ div >
149
141
)
150
142
AssociatedWithALabelAndCaption . storyName = '[Example] Associated with a label and caption'
0 commit comments