-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Widget/MarkdownPreview/EditPencil spacing
* Remove top padding from various `MarkdownPreview` elements, to avoid too much padding appearing at top of widget * Tighten coupling between EditButton and IconPencil, since the height and width of the button need to match the height and width of the svg (at least with current styling approach) * Remove IconPencil as a general-use import * Remove unused pencil.svg file * Make EditButton styles more generic, and override them inside the Widget component with behavior that's specific to Widget's use of the component * Make images expand to full width of widget, rather than 95%
- Loading branch information
Showing
8 changed files
with
64 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { Button as AragonButton } from '@aragon/ui' | ||
|
||
import IconPencil from './IconPencil' | ||
|
||
const Button = ({ ...props }) => ( | ||
<AragonButton mode="text" {...props}> | ||
<IconPencil /> | ||
</AragonButton> | ||
) | ||
|
||
const EditButton = styled(Button)` | ||
box-sizing: content-box; | ||
position: absolute; | ||
color: inherit; | ||
padding: 4px; | ||
margin: 0; | ||
height: 22px; | ||
width: 22px; | ||
` | ||
|
||
export default EditButton |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './EditButton' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export { default as MarkdownEditor } from './components/MarkdownEditor' | ||
export { default as MarkdownPreview } from './components/MarkdownPreview' | ||
export { default as EditButton } from './components/EditButton' | ||
export { default as IconPencil } from './assets/IconPencil' |