-
Notifications
You must be signed in to change notification settings - Fork 503
CloudBeaver Styling components
dbeaver-devops edited this page Sep 15, 2025
·
5 revisions
We use CSS Modules for styling components.
import { useState } from 'react';
import { useS, s } from '@cloudbeaver/core-blocks';
import style from './ExampleComponent.m.css';
function ExampleComponent({ className }) {
const [mode, setMode] = useState('enabled');
const [status, setStatus] = useState(false);
const styles = useS(style);
function handleClick() {
setStatus(!status);
if(status) {
setMode('enabled');
} else {
setMode('disabled');
}
}
return (
<div className={s(styles, { box: true }, className)}>
<h2 className={s(styles, { header: true })}>This is Header</h2>
<p className={s(styles, { message: true, status })}>This is message</p>
<button
className={s(styles, { switch: true })}
data-s-mode={mode}
type="button"
onClick={handleClick}
>
Change status
</button>
<div>
);
}.box {
border-radius: 3px;
border: solid 1px;
}
.header {
margin: 0;
}
.message {
padding: 8px;
}
.status {
color: red;
}
.switch {
padding: 2px; 4px;
}
.switch[data-s-mode="disabled"] {
opacity: 0.75;
}- Getting started
- Create connection
- Connection network options
- Supported databases
-
Drivers management
- Database authentication methods
- Database navigator
- Properties editor
- Data editor
- SQL editor
-
Entity relation diagrams
- Cloud services
-
AI Smart assistance
- Data transfer
- General user guide
- Administration
- Server configuration
-
Server security and access configuration
- Authentication methods
- Access management
- Proxy configuration
-
Secret management
- Logs
-
Query manager
- Workspace location
- Command line parameters
-
Session manager
- Deployment options
- CloudBeaver Editions
- FAQ
- Development