{ "_comment": "Edit and View Buttons", "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "display": "flex", "justify-content": "center", "flex-direction": "row" }, "children": [ { "elmType": "button", "customRowAction": { "action": "editProps" }, "attributes": { "class": "ms-fontColor-white ms-fontColor-black--hover" }, "style": { "border": "none", "cursor": "pointer", "background-color": "transparent" }, "children": [ { "elmType": "div", "attributes": { "class": "ms-bgColor-green ms-bgColor-greenLight--hover ms-fontColor-white ms-fontColor-black--hover" }, "style": { "font-size": "10px", "font-family": "arial", "border": "1px solid Black", "border-radius": "7px", "padding": "3px 5px 3px 5px", "box-shadow": "2px 2px 2px #999" }, "children": [ { "elmType": "div", "attributes": { "iconName": "Edit" }, "style": { "display": "=if('Edit' != '','inline-block','none')", "vertical-align": "middle", "padding-right": "5px" } }, { "elmType": "div", "txtContent": "EDIT", "style": { "display": "inline-block", "font-family": "arial", "vertical-align": "middle" } } ] } ] }, { "elmType": "button", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "ms-fontColor-white ms-fontColor-black--hover" }, "style": { "border": "none", "cursor": "pointer", "background-color": "transparent" }, "children": [ { "elmType": "div", "attributes": { "class": "ms-bgColor-blue ms-bgColor-blueLight--hover ms-fontColor-white ms-fontColor-black--hover" }, "style": { "font-size": "10px", "font-family": "arial", "border": "1px solid Black", "border-radius": "7px", "padding": "3px 5px 3px 5px", "box-shadow": "2px 2px 2px #999" }, "children": [ { "elmType": "div", "attributes": { "iconName": "CaretSolidAlt" }, "style": { "display": "=if('Edit' != '','inline-block','none')", "vertical-align": "middle", "padding-right": "5px" } }, { "elmType": "div", "txtContent": "VIEW", "style": { "display": "inline-block", "font-family": "arial", "vertical-align": "middle" } } ] } ] } ] }