1
1
import React , { useState , useRef , useEffect } from 'react'
2
2
import type { Meta , StoryObj } from '@storybook/react-vite'
3
- import Box from '../Box'
4
3
import { Button } from '../Button'
5
4
import type { ItemInput , GroupedListProps } from '../deprecated/ActionList/List'
6
5
import Link from '../Link'
@@ -27,6 +26,7 @@ import Text from '../Text'
27
26
import FormControl from '../FormControl'
28
27
import { SegmentedControl } from '../SegmentedControl'
29
28
import { Stack } from '../Stack'
29
+ import classes from './SelectPanel.features.stories.module.css'
30
30
31
31
const meta : Meta < typeof SelectPanel > = {
32
32
title : 'Components/SelectPanel/Features' ,
@@ -62,15 +62,12 @@ const ErrorMessage: {variant: 'error'; title: string; body: string} = {
62
62
function getColorCircle ( color : string ) {
63
63
return function ( ) {
64
64
return (
65
- < Box
66
- bg = { color }
67
- borderColor = { color }
68
- width = { 14 }
69
- height = { 14 }
70
- borderRadius = { 10 }
71
- margin = "auto"
72
- borderWidth = "1px"
73
- borderStyle = "solid"
65
+ < div
66
+ className = { classes . ColorCircle }
67
+ style = { {
68
+ backgroundColor : color ,
69
+ borderColor : color ,
70
+ } }
74
71
/>
75
72
)
76
73
}
@@ -530,15 +527,7 @@ export const WithLabelInternally = () => {
530
527
< SelectPanel
531
528
renderAnchor = { ( { children, ...anchorProps } ) => (
532
529
< Button { ...anchorProps } trailingAction = { TriangleDownIcon } aria-haspopup = "dialog" >
533
- < Box
534
- sx = { {
535
- color : 'var(--fgColor-muted)' ,
536
- display : 'inline-block' ,
537
- } }
538
- >
539
- Choices:
540
- </ Box > { ' ' }
541
- { children || 'None selected' }
530
+ < span className = { classes . MutedText } > Choices:</ span > { children || 'None selected' }
542
531
</ Button >
543
532
) }
544
533
open = { open }
0 commit comments