Download wp-calypso/client/components/action-card/docs/example.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 956 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/action-card/docs/example.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/action-card/docs/example.jsx
-
curl -L -o example.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/action-card/docs/example.jsx
956 Bytes
| import ActionCard from '../index'; | |
| ActionCard.displayName = 'ActionCard'; | |
| function ActionCardExample( props ) { | |
| return props.exampleCode; | |
| } | |
| ActionCardExample.displayName = 'ActionCard'; | |
| ActionCardExample.defaultProps = { | |
| exampleCode: ( | |
| <div> | |
| <ActionCard | |
| headerText="This is a header text" | |
| mainText="This is a description of the action. It gives a bit more detail and explains what we are inviting the user to do." | |
| buttonText="Call to action!" | |
| buttonIcon="external" | |
| buttonPrimary | |
| buttonHref="https://wordpress.com" | |
| buttonTarget="_blank" | |
| buttonOnClick={ null } | |
| /> | |
| <ActionCard | |
| headerText="This one has a disabled button." | |
| mainText="You can also disable the CTA button if necessary." | |
| buttonText="Disabled button" | |
| buttonIcon="external" | |
| buttonPrimary | |
| buttonHref="https://wordpress.com" | |
| buttonOnClick={ null } | |
| buttonDisabled | |
| /> | |
| </div> | |
| ), | |
| }; | |
| export default ActionCardExample; | |