| 230 | }); |
| 231 | |
| 232 | export function Tab(props: TabProps): ReactNode { |
| 233 | let contentId = useId(); |
| 234 | let ariaLabelledBy = props['aria-labelledby'] || ''; |
| 235 | return ( |
| 236 | <RACTab |
| 237 | {...props} |
| 238 | // @ts-ignore |
| 239 | originalProps={props} |
| 240 | aria-labelledby={`${ariaLabelledBy}`} |
| 241 | className={renderProps => tab({...renderProps})}> |
| 242 | <Provider |
| 243 | values={[ |
| 244 | [ |
| 245 | TextContext, |
| 246 | { |
| 247 | id: contentId, |
| 248 | styles: style({order: 1}) |
| 249 | } |
| 250 | ], |
| 251 | [ |
| 252 | IconContext, |
| 253 | { |
| 254 | // render: centerBaseline({slot: 'icon', styles: style({order: 0})}), |
| 255 | styles: icon |
| 256 | } |
| 257 | ] |
| 258 | ]}> |
| 259 | {props.children} |
| 260 | </Provider> |
| 261 | </RACTab> |
| 262 | ); |
| 263 | } |
| 264 | |
| 265 | const tabPanel = style({ |
| 266 | ...focusRing(), |