Skip to content

Commit

Permalink
#1 Update toolbar styling
Browse files Browse the repository at this point in the history
  • Loading branch information
markusbink committed Aug 13, 2022
1 parent 669d55e commit 625afd8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/components/entry/NewEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ import { EntryHeader } from "./EntryHeader";
import { Editor } from "react-draft-wysiwyg";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";

const toolbarOptions = {
options: ["inline", "list"],
inline: {
className: ["!mb-0"],
options: ["bold", "italic", "underline", "strikethrough"],
},
list: {
className: ["!mb-0"],
options: ["unordered", "ordered"],
},
};

interface NewEntryProps {
parentRole: "Kläger" | "Beklagter";
setIsNewEntryVisible: (isVisible: boolean) => void;
Expand Down Expand Up @@ -75,17 +87,7 @@ export const NewEntry: React.FC<NewEntryProps> = ({
editorClassName="p-6 "
placeholder="Text eingeben..."
toolbarClassName="p-2 relative"
toolbar={{
options: ["inline", "list"],
inline: {
className: ["!mb-0"],
options: ["bold", "italic", "underline", "strikethrough"],
},
list: {
className: ["!mb-0"],
options: ["unordered", "ordered"],
},
}}
toolbar={toolbarOptions}
toolbarCustomButtons={[
<Action
className="text-base absolute right-2 top-1/2 -translate-y-1/2"
Expand Down
8 changes: 8 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@ body {
@apply opacity-50 cursor-not-allowed;
}
}

.rdw-option-wrapper {
@apply w-7 h-7 rounded bg-offWhite hover:shadow-none hover:border-lightGrey;
}

.rdw-option-active {
@apply shadow-none border-mediumGrey box-border;
}

0 comments on commit 625afd8

Please sign in to comment.