Download wp-calypso/client/lib/features-helper/feature-list.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/features-helper/feature-list.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/features-helper/feature-list.js
-
curl -L -o feature-list.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/features-helper/feature-list.js
1.09 kB
| import config from '@automattic/calypso-config'; | |
| const headerClass = 'features-helper__feature-header'; | |
| const itemClass = 'features-helper__feature-item'; | |
| const enabledClass = 'features-helper__feature-item-enabled'; | |
| const disabledClass = 'features-helper__feature-item-disabled'; | |
| export default function FeatureList() { | |
| const currentXLProjects = []; | |
| const enabledFeatures = config.enabledFeatures(); | |
| return ( | |
| <> | |
| <div>Features</div> | |
| <div className="features-helper__current-features"> | |
| <div className={ headerClass }>Current XL Projects</div> | |
| { currentXLProjects.map( ( flag ) => { | |
| const isFlagEnabled = config.isEnabled( flag ); | |
| return ( | |
| <div | |
| key={ flag } | |
| className={ [ itemClass, isFlagEnabled ? enabledClass : disabledClass ].join( ' ' ) } | |
| > | |
| { flag } { isFlagEnabled ? 'ON' : 'OFF' } | |
| </div> | |
| ); | |
| } ) } | |
| <div className={ headerClass }>All Enabled Features</div> | |
| { enabledFeatures.map( ( flag ) => ( | |
| <div className={ itemClass } key={ flag }> | |
| { flag } | |
| </div> | |
| ) ) } | |
| </div> | |
| </> | |
| ); | |
| } | |