-
-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table actions #68
Table actions #68
Conversation
@@ -7,6 +7,7 @@ import { RenderElementTableOptions, TableType } from './types'; | |||
const StyledTable = styled.table` | |||
margin: 10px 0; | |||
border-collapse: collapse; | |||
width: 100%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full table width fits better as long as we can't position other elements next to the table anyway. Maybe this could be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes resizing the table, the columns and the rows would be nice in the future.
@@ -3,12 +3,33 @@ import { boolean } from '@storybook/addon-knobs'; | |||
import { createEditor } from 'slate'; | |||
import { withHistory } from 'slate-history'; | |||
import { Slate, withReact } from 'slate-react'; | |||
|
|||
import { | |||
BorderAll, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random choice of icons for the example buttons..
<HeadingToolbar> | ||
<ToolbarMark format={MARK_BOLD} icon={<FormatBold />} /> | ||
<ToolbarTable action={insertTable} icon={<BorderAll />} /> | ||
<ToolbarTable action={deleteTable} icon={<BorderClear />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we can add a floating delete button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some actions and example buttons for table editing: