Skip to content

Commit

Permalink
chore(docz-theme-default): codemirror adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Feb 19, 2019
1 parent e745c7d commit c8522ff
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const CodeMirror: SFC<any> = props => {
const editorProps = {
...props,
editorDidMount: (codemirror: any) => {
props.editorDidMount && props.editorDidMount(codemirror)
editor.current = codemirror
},
}
Expand Down
4 changes: 1 addition & 3 deletions core/docz-theme-default/src/components/ui/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ export const Editor: React.SFC<EditorProps> = ({
}

const onEditorDidMount = (editor: any) => {
if (editor) {
removeLastLine(editor)
}
if (editor) removeLastLine(editor)
}

const removeLastLine = useCallback(
Expand Down
5 changes: 4 additions & 1 deletion core/docz-theme-default/src/components/ui/Props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ const Title = styled.div`

const PropName = styled.span`
background: ${get('colors.sidebarBg')};
color: ${get('colors.sidebarText')};
color: ${get('colors.primary')};
padding: 5px 10px;
border-radius: 4px 4px 0 0;
font-size: 14px;
font-weight: 500;
& ~ & {
margin-left: 5px;
Expand All @@ -33,6 +34,8 @@ const PropName = styled.span`

const PropType = styled(PropName)`
color: ${get('colors.blockquoteColor')};
background: ${get('colors.sidebarBg')};
font-weight: 400;
`

const PropDefaultValue = styled(PropType)`
Expand Down
3 changes: 0 additions & 3 deletions core/docz-theme-default/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ declare module 'copy-text-to-clipboard'
declare module 'facepaint'
declare module 'hotkeys-js'
declare module 'match-sorter'
declare module 'polished/lib/color/lighten'
declare module 'polished/lib/color/darken'
declare module 'polished/lib/color/rgba'
declare module 'react-codemirror2'
declare module 'react-feather/dist/icons/edit-2'
declare module 'react-feather/dist/icons/chevron-down'
Expand Down

0 comments on commit c8522ff

Please sign in to comment.