Last active
April 9, 2024 01:03
-
-
Save tecchan1107/102d51405cf67b764b8e8bd39662b00a 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", | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"cursor": "pointer", | |
"border-radius": "7px", | |
"padding": "5px 10px", | |
"display": "=if(@currentField,'flex','none')", | |
"align-items": "center" | |
}, | |
"attributes": { | |
"class": "ms-fontSize-s ms-fontColor-white ms-bgColor-themePrimary ms-bgColor-themeTertiary--hover" | |
}, | |
"customRowAction": { | |
"action": "embed", | |
"actionInput": { | |
"src": "[$YouTube]", | |
"width": "640", | |
"height": "360" | |
} | |
}, | |
"children": [ | |
{ | |
"elmType": "span", | |
"style": { | |
"margin-right": "5px" | |
}, | |
"attributes": { | |
"iconName": "MSNVideosSolid" | |
} | |
}, | |
{ | |
"elmType": "span", | |
"txtContent": "Watch YouTube" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment