Improve caption editor usability, new 'add attachment' affordance
parent
ac1a6d197a
commit
0de54e125c
@ -0,0 +1 @@
|
||||
<svg id="Export" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><title>plus-36</title><polygon points="32 17.25 18.75 17.25 18.75 4 17.25 4 17.25 17.25 4 17.25 4 18.75 17.25 18.75 17.25 32 18.75 32 18.75 18.75 32 18.75 32 17.25"/></svg>
|
After Width: | Height: | Size: 244 B |
@ -0,0 +1,10 @@
|
||||
```js
|
||||
const attachment = {
|
||||
contentType: 'text/plain',
|
||||
fileName: 'manifesto.txt',
|
||||
};
|
||||
|
||||
<util.ConversationContext theme={util.theme}>
|
||||
<StagedPlaceholderAttachment onClick={attachment => console.log('onClick')} />
|
||||
</util.ConversationContext>;
|
||||
```
|
@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
interface Props {
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
export class StagedPlaceholderAttachment extends React.Component<Props> {
|
||||
public render() {
|
||||
const { onClick } = this.props;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="module-staged-placeholder-attachment"
|
||||
role="button"
|
||||
onClick={onClick}
|
||||
>
|
||||
<div className="module-staged-placeholder-attachment__plus-icon" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue