-
Notifications
You must be signed in to change notification settings - Fork 392
CloudBeaver Styling components
dbeaver-devops edited this page Dec 4, 2024
·
3 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;
}
- Application overview
- Demo Server
- Administration
- Server configuration
- Create Connection
- Connection Templates Management
- Access Management
-
Authentication methods
- Local Access Authentication
- Anonymous Access Configuration
- Reverse proxy header authentication
- LDAP
- Single Sign On
- SAML
- OpenID
- AWS OpenID
- AWS SAML
- AWS IAM
- AWS OpenId via Okta
- Snowflake SSO
- Okta OpenId
- Cognito OpenId
- JWT authentication
- Kerberos authentication
- NTLM
- Microsoft Entra ID authentication
- Google authentication
- User credentials storage
- Cloud Explorer
- Cloud storage
- Query Manager
- Drivers Management
- Supported databases
- Accessibility
- Keyboard shortcuts
- Features
- Server configuration
- CloudBeaver and Nginx
- Domain manager
- Configuring HTTPS for Jetty server
- Product configuration parameters
- Command line parameters
- Local Preferences
- API
-
CloudBeaver Community
-
CloudBeaver AWS
-
CloudBeaver Enterprise
-
Deployment options
-
Development