fix: options-ui hide edit icon from not implemented elements
This commit is contained in:
parent
c88f240352
commit
db4bad367a
@ -14,12 +14,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { ObjOverrideDto } from './obj-override.dto';
|
||||
import { ObjUrlDto } from './obj.dto';
|
||||
import { ObjHashtagable } from './obj-hashtag.dto';
|
||||
|
||||
export interface ObjPdfDto extends ObjHashtagable {
|
||||
hash: string;
|
||||
data: ObjPdfDataDto;
|
||||
override?: ObjOverrideDto;
|
||||
}
|
||||
|
||||
export interface ObjPdfDataDto {
|
||||
|
@ -45,6 +45,12 @@ export const BoardItemTitle: FunctionComponent<Props> = (props) => {
|
||||
</IconButton>
|
||||
) : undefined;
|
||||
|
||||
const editIcon = [ObjTypeDto.PageSnapshot, ObjTypeDto.PageElementSnapshot].includes(props.obj.type) ? (
|
||||
<IconButton onClick={() => props.editCallback()}>
|
||||
<EditIcon />
|
||||
</IconButton>
|
||||
) : undefined;
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
|
||||
<h2
|
||||
@ -56,9 +62,7 @@ export const BoardItemTitle: FunctionComponent<Props> = (props) => {
|
||||
</h2>
|
||||
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
||||
{htmlIcon}
|
||||
<IconButton onClick={() => props.editCallback()}>
|
||||
<EditIcon />
|
||||
</IconButton>
|
||||
{editIcon}
|
||||
<IconButton title="Remove" onClick={() => props.removeCallback()}>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
|
Loading…
Reference in New Issue
Block a user