prometheus/web/ui/react-app/src/themes
Luis Filipe Pessoa 9591103bb9
Allow copying label-value pair to buffer on click (#11229)
* Allow copying label-value pair to buffer on click

Kept similar DOM structure to keep test compatibility.
Using `navigator.clipboard` API since it is used by the current standard browsers.
React hot toast is used to notify that the text was successfully copied into clipboard.

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>

* Using reactstrap for toast notification

Using the bootstrap toast notification provided by reactstrap.
Clipboard handling is managed using React.Context via a shared callback.

Updated css according to CR suggestions.

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>

* Changes from CR comments

Cleaning up renderFormatted method.
Renamed Clipboard to ToastContext.
Updated tests.

Signed-off-by: Luis Pessoa <luisalmeida@yape.com.pe>

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>
Signed-off-by: Luis Pessoa <luisalmeida@yape.com.pe>
2022-09-20 14:30:24 +02:00
..
_bootstrap_dark.scss move to npm workspace 2021-09-10 15:38:20 +02:00
_bootstrap_light.scss move to npm workspace 2021-09-10 15:38:20 +02:00
_shared.scss Allow copying label-value pair to buffer on click (#11229) 2022-09-20 14:30:24 +02:00
app.scss Add a dark theme (#8604) 2021-04-15 18:14:07 +02:00
dark.scss web ui: Tweak colors in the dark theme to improve contrast ratio (#11068) 2022-08-01 15:28:09 +02:00
light.scss web ui: Tweak colors in the dark theme to improve contrast ratio (#11068) 2022-08-01 15:28:09 +02:00