diff --git a/snippets/Callto.md b/snippets/Callto.md new file mode 100644 index 000000000..59782a7af --- /dev/null +++ b/snippets/Callto.md @@ -0,0 +1,22 @@ +--- +title: Callto +tags: components,beginner +--- + +Renders a link formatted to call a phone number (`tel:` link). + +- Use `phone` to create a `` element with an appropriate `href` attribute. +- Render the link with `children` as its content. + +```jsx +const Callto = ({ phone, children }) => { + return {children}; +}; +``` + +```jsx +ReactDOM.render( + Call me!, + document.getElementById('root') +); +```