feat: staged attachments rail stying updated
updated StyledStagedPlaceholderAttachment to be a styled functional componentpull/2757/head
parent
d7200abfab
commit
ad38b15809
@ -1,17 +1,32 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class StagedPlaceholderAttachment extends React.Component<Props> {
|
const StyledStagedPlaceholderAttachment = styled.div`
|
||||||
public render() {
|
margin: 1px var(--margins-sm);
|
||||||
const { onClick } = this.props;
|
border-radius: var(--border-radius-message-box);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
height: 120px;
|
||||||
|
width: 120px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
return (
|
&:hover {
|
||||||
<div className="module-staged-placeholder-attachment" role="button" onClick={onClick}>
|
background-color: var(--background-secondary-color);
|
||||||
<div className="module-staged-placeholder-attachment__plus-icon" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export function StagedPlaceholderAttachment(props: Props) {
|
||||||
|
const { onClick } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<StyledStagedPlaceholderAttachment role="button" onClick={onClick}>
|
||||||
|
<div className="module-staged-placeholder-attachment__plus-icon" />
|
||||||
|
</StyledStagedPlaceholderAttachment>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue