mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
* remove redundant sanitizeHTML abstraction Signed-off-by: blalov <boiskila@gmail.com> * organize folders Signed-off-by: blalov <boiskila@gmail.com> * move hooks outside common folder Signed-off-by: blalov <boiskila@gmail.com> * move PathPrefix interface in types Signed-off-by: blalov <boiskila@gmail.com> * remove config folder Signed-off-by: blalov <boiskila@gmail.com> * remove redundant snapshots Signed-off-by: blalov <boiskila@gmail.com> * rename common folder Signed-off-by: blalov <boiskila@gmail.com> * merge utils files Signed-off-by: Boyko Lalov <boiskila@gmail.com> * sync with master Signed-off-by: blalov <boiskila@gmail.com>
29 lines
611 B
TypeScript
29 lines
611 B
TypeScript
import React, { FC } from 'react';
|
|
import { Button } from 'reactstrap';
|
|
|
|
interface ToggleMoreLessProps {
|
|
event(): void;
|
|
showMore: boolean;
|
|
}
|
|
|
|
export const ToggleMoreLess: FC<ToggleMoreLessProps> = ({ children, event, showMore }) => {
|
|
return (
|
|
<h3>
|
|
{children}
|
|
<Button
|
|
size="xs"
|
|
onClick={event}
|
|
style={{
|
|
padding: '0.3em 0.3em 0.25em 0.3em',
|
|
fontSize: '0.375em',
|
|
marginLeft: '1em',
|
|
verticalAlign: 'baseline',
|
|
}}
|
|
color="primary"
|
|
>
|
|
show {showMore ? 'less' : 'more'}
|
|
</Button>
|
|
</h3>
|
|
);
|
|
};
|