File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1- import { CSSProperties , useState } from 'react'
1+ import { useState } from 'react'
22import { useConfig } from '../hooks/useConfig.js'
33import { cn } from '../lib/utils.js'
44import styles from '../styles/ErrorBar.module.css'
@@ -21,7 +21,7 @@ export default function ErrorBar({ error }: ErrorBarProps) {
2121
2222 return < div
2323 className = { cn ( styles . errorBar , customClass ?. errorBar ) }
24- style = { { '--error-bar-visibility' : showError ? 'visible' : 'hidden' } as CSSProperties }
24+ data-visible = { showError }
2525 >
2626 < div >
2727 < span > { error ?. toString ( ) } </ span >
Original file line number Diff line number Diff line change 11.errorBar {
2- visibility : var ( --error-bar-visibility , hidden) ;
2+ display : none ;
33 max-height : 30% ;
44 padding : 0 ;
55 background-color : # dd111199 ;
88 white-space : pre-wrap;
99 font-family : monospace;
1010
11+ & [data-visible = "true" ] {
12+ display : block;
13+ }
14+
1115 & > div {
1216 display : flex;
1317 align-items : center;
You can’t perform that action at this time.
0 commit comments