mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 19:45:51 +01:00
Replace styled-components with bulma helpers (#1783)
Use Bulma helpers whenever possible instead of custom styled components. This pull request replaces primarily color definitions, spacing and flex instructions.
This commit is contained in:
@@ -36,7 +36,6 @@ import Popover from "./Popover";
|
||||
import AnnotateLine from "./AnnotateLine";
|
||||
import { Action } from "./actions";
|
||||
import { determineLanguage } from "../../languages";
|
||||
import styled from "styled-components";
|
||||
|
||||
type Props = {
|
||||
source: AnnotatedSource;
|
||||
@@ -57,11 +56,6 @@ const initialState = {
|
||||
onLine: false,
|
||||
};
|
||||
|
||||
const NoSpacingReactSyntaxHighlighter = styled(ReactSyntaxHighlighter)`
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
`;
|
||||
|
||||
const reducer = (state: State, action: Action): State => {
|
||||
switch (action.type) {
|
||||
case "enter-line": {
|
||||
@@ -152,14 +146,15 @@ const Annotate: FC<Props> = ({ source, repository, baseDate }) => {
|
||||
return (
|
||||
<div className="panel-block">
|
||||
{popover}
|
||||
<NoSpacingReactSyntaxHighlighter
|
||||
<ReactSyntaxHighlighter
|
||||
className="m-0 p-0"
|
||||
showLineNumbers={false}
|
||||
language={determineLanguage(source.language)}
|
||||
style={highlightingTheme}
|
||||
renderer={defaultRenderer}
|
||||
>
|
||||
{code}
|
||||
</NoSpacingReactSyntaxHighlighter>
|
||||
</ReactSyntaxHighlighter>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user