Last active
February 12, 2022 12:23
-
-
Save tecchan1107/1f60ebcfb106f99cef906e4c8bc8a07f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", | |
"elmType": "div", | |
"style": { | |
"display": "flex", | |
"width": "100%", | |
"height": "100%", | |
"align-items": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"display": "flex", | |
"width": "60px", | |
"height": "30px", | |
"border-radius": "15px", | |
"align-items": "center", | |
"flex-direction": "row", | |
"justify-content": "=if(@currentField , 'flex-end' , 'flex-start')", | |
"cursor": "pointer" | |
}, | |
"customRowAction": { | |
"action": "setValue", | |
"actionInput": { | |
"YesNoInternalName": "=if(@currentField , '0' , '1' )" | |
} | |
}, | |
"attributes": { | |
"class": "=if(@currentField , 'ms-bgColor-themePrimary' , 'ms-bgColor-neutralTertiaryAlt')" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"width": "18px", | |
"height": "18px", | |
"margin-left": "8px", | |
"margin-right": "8px", | |
"border-radius": "50%", | |
"display": "flex", | |
"justify-content": "center", | |
"align-items": "center", | |
"font-size": "18px" | |
}, | |
"attributes": { | |
"class": "ms-fontColor-white", | |
"iconName": "HeartFill" | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment